Date Issue

william11

New Member
Joined
Aug 11, 2014
Messages
21
Hi, and thank you for reading.

Billing frequency (B1) is either quarterly (4), semi-annual(2), or yearly(1) from drop-down list. I have a cell (A1) for the date when my contract begins and C1 would be the first bill date, in another cell (D1) I would like to display the next bill due for each user. I also want D1 to auto-update based on current date and add either 3 months, 6 months, or a year to D1 when 'next bill date' has already occurred.

A B C D
|Start date | Billing Frequency | First Bill Date | Next Bill Date|



So I was thinking something like this:

IF(AND(B1=1, than auto-update D1 yearly, IF(B1=2, then auto-update D1 semi-annual, IF(B1=4, then auto-update D1 quarterly

and I guess somehow this needs to correspond with TODAY() in order to update itself.
 
The =EDATE(C2,12/D2) was in response to post #3, so it only calculates the next billing date based on the 1st billing date.

The =EDATE(C2,DATEDIF(C2,TODAY(),"m")+12/D2-(MOD(DATEDIF(C2,TODAY(),"m"),12/D2))) works properly for me. Please verify C2 is formatted as date, and D2 is formatted as number (and not text)
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
The =EDATE(C2,12/D2) was in response to post #3, so it only calculates the next billing date based on the 1st billing date.

The =EDATE(C2,DATEDIF(C2,TODAY(),"m")+12/D2-(MOD(DATEDIF(C2,TODAY(),"m"),12/D2))) works properly for me. Please verify C2 is formatted as date, and D2 is formatted as number (and not text)




This is my screen.. basically. The formatting for date/number is correct. I am at a loss. I will study up on DATEDIF and let you know if I figure it out. Any last thoughts are greatly appreciated.

=EDATE(I3,DATEDIF(I3,TODAY(),"m")+12/G3-(MOD(DATEDIF(I3,TODAY(),"m"),12/G3)))



Customer
Locker #Effective DateLocker2LockersBilling FrequencyBilling CyleFirst Bill Date1st BillNext Bill DateNext Bill AmountMonthAnnual
William8/1/2014120115th8/15/2014$148.50#NUM!$132.00$33.00$132.00
Alexandra8/1/2014120215th8/15/2014$82.50#NUM!$66.00$33.00$132.00
michael scott12/15/201412011st1/1/2015$151.80#NUM!$132.00$33.00$132.00
pam beesley00115th1/15/1900$0.00$0.00$0.00$0.00
jim00115th1/15/1900$0.00$0.00$0.00$0.00
dwight schrute00115th1/15/1900$0.00$0.00$0.00$0.00

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
The problem is you're starting with "future dates" ie: 8/15/14 and 1/15/15 (today is 8/11/14). The formula will work if the First Bill date is earlier than TODAY().
 
Upvote 0
We can combine the 2 formulas I gave to handle both past and future dates, like this:
Code:
=IF(I3>TODAY(),EDATE(I3,12/G3),EDATE(I3,DATEDIF(I3,TODAY(),"m")+12/G3-(MOD(DATEDIF(I3,TODAY(),"m"),12/G3))))
 
Upvote 0
Thank you for the reply Snakehips. I was hoping for a formula that would display the desired dates in cell D


Please only consider column C and how to apply column B in order to get the result in column D. Also, this will need to auto-update another year, half year, or 3 months when date in column D has been reached.

Thank you for your help.

@william11 Give or take the declared error, I thought that is exactly what I did?

Having read the subsequent posts I'm still confused as to some of the column references you are making.
In your more recent posts it looks to me as though First bill date is col H, Next bill date is J and Frequency is col F ?????

My solution below makes that assumption. If not correct then just alter the column references to suit.

@Ron Thanks for the heads up on EDATE. Despite some years of messing with Excel that wasn't previously on my radar.

Using EDATE I would now offer the solution below.

Having adjusted your latest formula, col O, to suit my assumed understanding of the data layout, there does appear to be the one discrepancy between our solutions, O5 ???

Excel 2007
ABCDEFGHIJKLMNO
1Ron's Latest ?
2Customer#Effective DateL2LockersFreqBilling CyleFirst Bill Date1st BillNext Bill DateAmountMonthAnnual
3William01/07/2014120115th15/07/2014$148.5015/07/2015$132.00$33.00$132.0015/07/2015
4Alexandra01/08/201412021st01/08/2014$82.5001/02/2015$66.00$33.00$132.0001/02/2015
5michael scott15/12/201412011st01/01/2015$151.8001/01/2015$132.00$33.00$132.0001/01/2016
6pam beesley01/07/201400415th15/07/2014$0.0015/10/2014$0.00$0.00$0.0015/10/2014
7jim22/02/201400215th01/03/2014$0.0001/09/2014$0.00$0.00$0.0001/09/2014
8dwight schrute00115th$0.00$0.00$0.00$0.0031/12/2014
Sheet3
Cell Formulas
RangeFormula
J3=IF(H3="","",IF(H3),EDATE(H3,CEILING(DATEDIF(H3,TODAY(),"m")+1,12/F3)),H3))
O3=IF(H3>TODAY(),EDATE(H3,12/F3),EDATE(H3,DATEDIF(H3,TODAY(),"m")+12/F3-(MOD(DATEDIF(H3,TODAY(),"m"),12/F3))))
 
Last edited:
Upvote 0
Snakehips,
You're welcome on the EDATE(). I'm also a little confused on the OP's column references and use of future dates. Hopefully one of our formula's will give him what he's looking for. Regarding row #5 in your example, my interpretation is that Col J Next Bill Date should be the billing following the First Bill Date in Col H - using this logic, 01/01/2016 in my calc would be correct since it's 1 year after the 1st Bill Date of 01/01/2015. Also, I should have included handling of blanks in cell dates like you did.
Ron
 
Upvote 0
Snakehips,
Regarding row #5 in your example, my interpretation is that Col J Next Bill Date should be the billing following the First Bill Date in Col H - using this logic, 01/01/2016 in my calc would be correct since it's 1 year after the 1st Bill Date of 01/01/2015.


Gotcha. I was working on the basis that if the first payment date is in the future then that is also the next payment date.:confused:

Hopefully OP will put us out of our misery shortly.
 
Upvote 0
We can combine the 2 formulas I gave to handle both past and future dates, like this:
Code:
=IF(I3>TODAY(),EDATE(I3,12/G3),EDATE(I3,DATEDIF(I3,TODAY(),"m")+12/G3-(MOD(DATEDIF(I3,TODAY(),"m"),12/G3))))



Perfect!! Thanks Ron you have been a huge help. I met my match with this equation and you came through with some serious knowledge.. much appreciative.


Snakehips, thanks for following up, it seems we both learned something new so that's nice... win win win.

cheers
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top