Number of days to next birthday


Posted by Tony Evans on November 26, 2001 12:27 AM

I know its been done, I would like to know if anyone has done the formula for number of days to next birthday, from a current date. I'm working through it and now have leap years to consider ! Roll on Decimal time (no I'm joking honest!)

Any help or guidance appreciated. I using Excel 97



Posted by Mark W. on November 26, 2001 6:57 AM

=A1-TODAY() where A1 contains the next birthday
as a datevalue. If you really want to get sneaky
store your birthday as a text value in m/d format
(e.g., "11/30") and use...

=IF(A1+0>TODAY(),A1-TODAY(),EDATE(A1,12)-TODAY())

...this formulation works regardless of the year.
Note: The EDATE() worksheet function is only
available once the Analysis ToolPak has been
added.