Sunday, January 26, 2014

Excel datedif formula

Useful excelformula that is hidden from the common gui, but present in all version of excel.

To compare a date to today

=DATEDIF(A1,TODAY(),"d")
Outputs difference in days. Can also return in complete months, years and then some.




















D

Number of days

MNumber of complete months
Y

Number of complete years

YD

Number of days excluding years

MD

Number of days excluding months and years

YM

Number of months excluding years


Note that on Swedish systems formulas look like this instead:


image


Comma is replaced by semicolon for some reason.


References:


http://excel.datedif.com/


http://stackoverflow.com/questions/10928586/excel-calculate-the-date-difference-from-today-from-a-cell-of-7-6-2012-102642

No comments:

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...