Forum Discussion

Chuck950's avatar
Chuck950
Copper Contributor
Apr 15, 2022
Solved

Adding years to a date

I am trying to add years to a date.

 

I've tried 2 formulas but I get a #Value! error.

 

The first formula is =EDATE(I4,(X4/12))

The second formula is =DATE(YEAR(I4)+w4,month(I3),DAY(I4))

 

For both formulas the original date is I4.

The number of years is W4.

The number of months is X4.

 

I don't know what I'm doing wrong. I would be very grateful for any help.

  • Chuck950  So I see a couple things:

    The first formula is =EDATE(I4,(X4/12))   --->  EDATE moves by months so try: =EDATE(I4,X4)

    The second formula is =DATE(YEAR(I4)+w4,month(I3),DAY(I4))   --->  What is I3?  typo?

    On another note please make sure I4 is actually a DATE VALUE and not a text value that just looks like a date.  Simple test: =I4+1  should produce a result of the next day.  If it errors then I4 is most likely text that looks like a date to YOU but not to Excel.

3 Replies

  • mtarler's avatar
    mtarler
    Silver Contributor

    Chuck950  So I see a couple things:

    The first formula is =EDATE(I4,(X4/12))   --->  EDATE moves by months so try: =EDATE(I4,X4)

    The second formula is =DATE(YEAR(I4)+w4,month(I3),DAY(I4))   --->  What is I3?  typo?

    On another note please make sure I4 is actually a DATE VALUE and not a text value that just looks like a date.  Simple test: =I4+1  should produce a result of the next day.  If it errors then I4 is most likely text that looks like a date to YOU but not to Excel.

    • Chuck950's avatar
      Chuck950
      Copper Contributor

      mtarler

       

      Thank you so much for your help. My vision is poor and I missed the typo. Thank you for catching it. 

Resources