-->

显示即将到来的到期日(Display the upcoming due date)

2019-10-29 22:22发布

I am working with Microsoft Excel for Mac 2011 doing some personal finance and trying to devise a formula to display a specific date.

I have a credit card bill that is due on the 24th of every month. I have the name in Column A, and the Date it is due in Column B. Say that the current month is October, and the bill will be due on the 24th, I want it to display 10/24/15 (mm/dd/yy). I do not want to show any previous dates or current date, I only want to display the upcoming due date, and I want it to remain set on 10/24/15 until 10/25/15 where it will show me the next due date as 11/24/15, the very next month.

I need it to show the due date from 09/25/15 until 10/24/15. Then on 10/25/15 I need it to display the next due date.

Answer 1:

我想我明白。 在我的例子,我的数据设置是这样的:

     A         B
1   Name    Due Date
2   Visa    10/24/2015

对于细胞B2,我有以下公式: =IF(DAY(TODAY())>=25,DATE(YEAR(TODAY()),MONTH(TODAY())+1,24),DATE(YEAR(TODAY()),MONTH(TODAY()),24))

我假设你会被打开电子表格并希望每月更新到一个我们目前正处在(因此使用Today()

编辑:要打破它 -

使用=today()将返回今天的默认格式(敢肯定这是无论你的默认格式为,即MM / DD / YYYY)的日期。 因此,使用=Month(today())将只返回当天日期的一个月 ......就像Year(today()) day(today())将返回“今天的年”和日,如果是有道理的。

If语句看起来,看看今天的数字日期是大于或等于25如果是,则返回与今天的一年,今天的一个月加一 ,而24日的日期。 如果今天是小于25,则返回今天的一年,今天的月,24天。

希望帮助!

EDIT2 -一个更强大的公式,让您保持一个单独的表与date每个月你的帐单到期。 从本质上讲,你只是取代了“幻数” 24Vlookup公式, VLOOKUP(B3,$F$2:$G$4,2,FALSE)

下面是它如何工作的:

而不是“硬编码”的24式中,你必须改变您的每一次变化卡(或您每月有不同的到期日),您可以创建一个表有这些值。 我的范围F2:G4显示哪些卡是因为它的日期。 (即VISA是由于在24日,因此24日之后,显示下月)。 这样一来,你拖动公式向下的“B”柱,并自动更新。 (看我怎么美国运通说是由于在第10位。但今天是19,所以这样,我们得到11月 10日为到期日。)

因此,对于复制的目的,新配方是=IF(DAY(TODAY())>VLOOKUP(B3,$F$2:$G$4,2,FALSE),DATE(YEAR(TODAY()),MONTH(TODAY())+1,VLOOKUP(B3,$F$2:$G$4,2,FALSE)),DATE(YEAR(TODAY()),MONTH(TODAY()),VLOOKUP(B3,$F$2:$G$4,2,FALSE))) (当然,你需要改变的范围需要为您的表)。



Answer 2:

UNTESTED。 请试试:

=IF(DAY(TODAY())<25,DATE(YEAR(TODAY()),MONTH(TODAY()),24),DATE(YEAR(TODAY()),MONTH(TODAY()+1),24))


Answer 3:

此解决方案假定以下几点:

  • 在Microsoft Excel中的Mac 2011包括Excel函数EOMONTH
  • 应付帐款表位于B1:D6 (调整根据需要)具有以下字段(参见图1):

户名 :应付账款的名称

到期日 :月日时付款是由于

截止日期 :下次付款日期

在输入任何这两个公式的C2和复制,直到最后一个记录

公式1:

=IF(DAY(TODAY())>$C3,
EOMONTH(TODAY(),0)+$C3,
EOMONTH(TODAY(),-1)+$C3)

配方2:

=EOMONTH(TODAY(),
IF(DAY(TODAY())>$C3,0,-1))
+$C3



文章来源: Display the upcoming due date