Forum Discussion
Formula to compare dates cells and calculate new date based on newer date
I have an Excel 365 spreadsheet with 2 columns of dates in the row. Sometimes the dates are days apart and sometimes the dates are years apart. I would like to add a column to compare the 2 dates and add 5 years to the newer date. Is there a formula for that?
You can use a formula like =EDATE(MAX(A3,B3),$C$1), where A3 is date1 and B3 is date2, and C1 is the number of months to add to the newer date. The EDATE (equivalent date) function will add months to the date, and you use the MAX function to determine which is the newer date. Use 60 months for 5 years.
2 Replies
- USSMcBCopper Contributor
That works perfectly. Thank you.
You can use a formula like =EDATE(MAX(A3,B3),$C$1), where A3 is date1 and B3 is date2, and C1 is the number of months to add to the newer date. The EDATE (equivalent date) function will add months to the date, and you use the MAX function to determine which is the newer date. Use 60 months for 5 years.