Calculate next future date

Mindlesh

Board Regular
Joined
Apr 2, 2014
Messages
172
Given:
Code:
=IF([@Start]>TODAY(),[@Start],DATE(YEAR([@Start]),MONTH([@Start])+[@Frequency],DAY([@Start])))
If Start=31/07/2016 and Frequency=12, the result is 31/07/2017.
If Start=31/01/2016 and Frequency=12, the result is 31/01/2017. How can I adapt the formula so that the result is 31/01/2018 (the next date on or after today)?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
What would be the result here if the frequency is 3 instead of 12
 
Upvote 0
What would be the result here if the frequency is 3 instead of 12

If Start=31/01/2016 or Start=31/01/2015, and Frequency=3, the result should be 1/05/2017. (Ideally, it would be 30/04/2017, but that would be more difficult I guess.)
 
Last edited:
Upvote 0
If Start=31/01/2015 and Frequency=12, the result is 31/01/2017 instead of 31/01/2018; ie. not the next date on or after today.
If Start=31/01/2016 or Start=31/01/2015, and Frequency=3, the result should be 1/05/2017. (Ideally, it would be 30/04/2017, but that would be more difficult I guess.)
This gives the desired results:

=IF([@Start]>TODAY(),[@Start],EDATE([@Start],[@Frequency]*IFERROR(2+INT(DATEDIF(EDATE([@Start],[@Frequency]),TODAY(),"m")/[@Frequency]),1)))
 
Upvote 0
Fantastic, thank you! Just a couple of points:

  1. If the next date is today, it is skipped for the next date after today.
  2. I don't suppose you could adapt the formula for the case where Frequency is expressed in days, please?
 
Upvote 0
I have assumed that the Start date is in C2 and the frequency is in cell D2. You can adjust the ranges as per your suitability.

This shorter version worked for me.


If the frequency is in months use this

=IF(C2>TODAY(),C2,DATE(YEAR(C2)+1,MONTH(C2)+D2,DAY(C2))

If the frequency is in days use this

=IF(C2>TODAY(),C2,DATE(YEAR(C2)+1,MONTH(C2)+(D2/30.5),DAY(C2))
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,102
Members
449,205
Latest member
ralemanygarcia

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