View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Millerk
 
Posts: n/a
Default Formula to compute someone's age if you enter their B-day

Pete,

Thanks for the formula. I fooled around with it after I posted the question
and came up with a very similar formula that seems to be working.

=IF(C5="","",DATEDIF(C5,NOW(),"y"))

I guess the ""= 0 in this case. Thanks for the response.

"Pete_UK" wrote:

Dates are stored in Excel as the number of days elapsed since some
reference date - the date is 31st December 1899. So, if C5 is empty,
there are 106 years between the reference date and today. To guard
against this you could have something like:

=IF(C5=0,0,DATEDIF(C5,NOW(),"y"))

Hope this helps.

Pete