A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Use a formula in Column E that checks both conditions:
- if the child was already 30 months or older on the appraisal date, expire in 24 months
- if the child was under 30 months on the appraisal date, but will reach 30 months before the 13-month expiration, then also expire in 24 months
- otherwise expire in 13 months
In E3:
=IF(C3="","",IF(DATEDIF(B3,C3,"M")>=30,EDATE(C3,24),IF(EDATE(B3,30)<=EDATE(C3,13),EDATE(C3,24),EDATE(C3,13))))
How it works:
-
DATEDIF(B3,C3,"M")>=30checks whether the child was already 2 years 6 months old at the time of the health appraisal. -
EDATE(B3,30)calculates the date the child turns 30 months. -
EDATE(C3,13)calculates the normal 13-month expiration date. - If the 30-month birthday is on or before that 13-month expiration date, the formula switches to 24 months from the appraisal date.
For the examples described:
- appraisal at 2 years 3 months and now over 2 1/2: this formula returns 2 years from the appraisal date
- child currently under 2 1/2 but turning 2 1/2 before the 13-month mark: this formula also returns 2 years from the appraisal date
- child still under 2 1/2 through the full 13 months: this formula keeps the 13-month expiration
Column F can stay as-is:
=IF(E3="","",IF(E3<TODAY(),"Expired",IF(E3<=TODAY()+30,"Expiring in 30 days","Current")))
If Column E shows a number instead of a date, format the cells as a date:
Home > Number Format > Short Date