Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
=DATEDIF(A2,IF(B2="",TODAY(),B2),"Y")&" yr "&DATEDIF(A2,IF(B2="",TODAY(),B2),"YM")&" mo"Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Need it for your exact data?
Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.
Enter their termination date in column B. The IF(B2="",TODAY(),B2) portion will use that date instead of TODAY().
Yes — use =DATEDIF(A2,TODAY(),"Y") to return only the count of complete years.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: