How to Add Years to a Date in Excel
Add warranty years to purchase dates with DATE and EDATE, handle February 29 correctly, and flag expired warranties.
You will learn to
- Add a number of years with DATE
- Add years safely with EDATE
- Compare an expiry date with an as-of date
How it works
Excel has no ADDYEARS function, but two formulas do it. =DATE(YEAR(B2)+C2,MONTH(B2),DAY(B2)) rebuilds the date with a later year. =EDATE(B2,12*C2) adds the same number of years as months. Use a negative number of years to go back in time.
The difference shows on February 29. DATE turns February 29 in a non-leap year into March 1, while EDATE stays in February and returns the 28th — usually what contracts and warranties expect. Compare the result with an as-of date to label each item Active or Expired.
=EDATE(B2,12*C2)