The simplest way to do this is with the EDATE function.

Embedding calculations this way can help make the assumptions and purpose of a formula easier to understand.

Note: EDATE returns a date as aserial number, so apply a datenumber formatto display as a date.

Excel formula: Get age from birthday

TheDAY functionreturns the day of the birthdate.

If the day is 1, the expression returns TRUE.

Otherwise, the expression returns FALSE.

Excel formula: Calculate years between dates

The math operation of subtraction coerces TRUE to 1 and FALSE to zero.

This moves first-of-month birthdays to the last day of the previous month.

To use it, we subtract today’s date from the retirement date.

Excel formula: Get same date next year

you could see the result in row 8, where the retirement date has already passed.

Ifnumberis positive, SIGN returns 1.

Ifnumberis negative, sign returns -1.

Excel formula: Next business day 6 months in future

Ifnumberis zero, SIGN returns 0.

How to calculate and highlight expiration dates

Excel formula: Next anniversary date

Excel EDATE function

Excel YEARFRAC function

Excel SIGN function

Article image