Monday, July 20, 2009

What’s the Dif?

Mysteriously, for the past 10 years or so, Microsoft has chosen not to include documented information (in Help or otherwise) of a very interesting function in Excel. DateDif is a very useful tool to do calculations using dates. Here is how the function looks and works:

=DateDif(First Date, Second Date, Time Interval)

Where the Time Interval is expressed in:
1) "m" = months
2) "d" = days
3) "y" = years

An enjoyable application of this function is to nest the NOW() function into it and calculate a person’s age as follows (Note: the “BirthDate” can refer to an easily changed cell value):

=DateDif(BirthDate, NOW(), “y”)

Give DateDif a try some time. You may find numerous ways to use it in business (as well as amusement).

No comments: