There are several variations available (e.g.

time in months, time in months ignoring days and years, etc.)

and these are set by the “unit” argument in the function.

Excel formula: Get days, hours, and minutes between dates

Seethis page on the DATEDIF functionfor a full list of available units.

for use the LET function on this formula, we need to think about variables.

Looking at the formula, there are at least five opportunities to declare variables.

Excel formula: Get days between dates

The first two are thestartdate and theenddate, which are reused throughout the formula.

Once we assign values tostartandend, we only need to refer to cells C5 and D5 one time.

Thestartandenddates are then reused throughout the formula.

Excel formula: Get months between dates

This makes it easier to read the formula and helps reduce errors.

The next three opportunities for variables are the results from DATEDIF foryears,months, anddays.

With the LET function, the lastargumentis the calculation or value that returns a final result.

Excel formula: Detailed LET function example

year" not “years”).

Then we use the IF function to conditionally tack on an “s” only when the number isnot1.

If the numberis1, IF returns anempty string("") and the unit name remains singular.

Excel DATEDIF function

See more details about theLET function here.

Also, see theDetailed LET function examplefor another explanation of converting an existing formula to use LET.

The DATEDIF (Date + Dif) function is a “compatibility” function that comes from Lotus 1-2-3.

Excel LET function