How to Calculate Next N-Year-versarry in Excel
I found this tutorial on calculating the next anniversary date on ExcelJet.
How do I modify this to calculate the next multi-year-versarry. For example, I have date items that don't occur, but every 3, 5, 8, or 10 years.
If the item occurs every multi-years that starts from the "Date", I think it needs to add conditions.
For example, the multi-years is 3, you may try the following formula.
=IF(MOD(DATEDIF(A2,B2,"y"),3)=0,EDATE(A2,(DATEDIF(A2,B2,"y")+3)*12),EDATE(A2,(DATEDIF(A2,B2,"y")+3-(MOD(DATEDIF(A2,B2,"y"),3)))*12))
For other multi-years, you may replace "3" in formula with the multi-years number.
5 years: =IF(MOD(DATEDIF(A2,B2,"y"),5)=0,EDATE(A2,(DATEDIF(A2,B2,"y")+5)*12),EDATE(A2,(DATEDIF(A2,B2,"y")+5-(MOD(DATEDIF(A2,B2,"y"),5)))*12))
8 years: =IF(MOD(DATEDIF(A2,B2,"y"),8)=0,EDATE(A2,(DATEDIF(A2,B2,"y")+8)*12),EDATE(A2,(DATEDIF(A2,B2,"y")+8-(MOD(DATEDIF(A2,B2,"y"),8)))*12))
10 yeras: =IF(MOD(DATEDIF(A2,B2,"y"),10)=0,EDATE(A2,(DATEDIF(A2,B2,"y")+10)*12),EDATE(A2,(DATEDIF(A2,B2,"y")+10-(MOD(DATEDIF(A2,B2,"y"),10)))*12))
The +1
in the formula add one year. To get the other dates as mentioned on the question, you change +1
to +3
, +5
, +8
and +10
.
The formulae for the 1, 3, 5, 8 and 10 years will be:
=LET(x,DATEDIF($A6,TODAY(),"y"),EDATE($A6,(x+1)*12))
=LET(x,DATEDIF($A6,TODAY(),"y"),IF(MOD(x,3)=0,EDATE($A6,(x+3)*12),EDATE($A6,(x+3-MOD(x,3))*12)))
=LET(x,DATEDIF($A6,TODAY(),"y"),IF(MOD(x,5)=0,EDATE($A6,(x+5)*12),EDATE($A6,(x+5-MOD(x,5))*12)))
=LET(x,DATEDIF($A6,TODAY(),"y"),IF(MOD(x,8)=0,EDATE($A6,(x+8)*12),EDATE($A6,(x+3-MOD(x,8))*12)))
=LET(x,DATEDIF($A6,TODAY(),"y"),IF(MOD(x,10)=0,EDATE($A6,(x+10)*12),EDATE($A6,(x+10-MOD(x,10))*12)))
Based on the example from the image on the OP and the comments to considered "As of" column as today, below are the respective dates: