In honor of the 40th anniversary of J.K. Rowling’s seminal classic, Harry Potter, this post magically exposes a hidden excel function!
Ever wonder if your spreadsheet is keeping something from you?
DATEDIF is an under-documented function. It allows you to calculate the difference between two dates. Although it doesn’t appear in the Function Wizard (it exists to insure backward compatibility with Lotus and earlier Excel versions) it is a powerhouse when it comes to calculating date differences.
Using DATEDIF function:
- Format: =DATEDIF ( date1, date2, “interval”)
- date1 must be the earlier of the two dates or an #NUM error is returned.
|ym||Months, years excluded|
|yd||Days, years excluded|
|md||Days, years and months excluded|
- J.K. Rowling made more $ than Drake and Cristiano Ronaldo this year
- Calculating Dates with NETWORKDAYS function
- Celebrities celebrate JK Rowling’s [success]
- Excel Data Consolidation
- More Excel Tips
Comments and questions are always welcome!