Excel’s hidden function- DATEDIF

There is one function in Excel which you will not find in the help files or the function wizard. There is no help with the syntax when you start the formula.

This is the DATEDIF (said Date Dif, presumable standing for Date differential) and it allows you to find the difference between dates in days, months, years and other combinations.

The syntax is

=DATEDIF(start date, end date, type)

The type options allows for the following (they must be entered with the ” ” to work)

“d”        Days between the two dates (this is the same as just subtracting one date from another).

“m”       Months between the two dates.

“y”        Years between the two dates.

“yd”      Days between the dates, as if the dates were in the same year.

“ym”     Months between the dates, as if the dates were in the same year.

“md”     Days between the two dates, as if the dates were in the same month and year.

 

Learn more at our live advanced Excel courses in South Africa. Visit www.AuditExcel.co.za Live Excel Training page