Calculating Age

D

devinm21

If I have a person's birthday, how can I calculate their current age based on
today's date?


Thanks!
 
V

Vic Sowers

In whole years:

=YEAR(NOW())-YEAR(A1)-IF(MONTH(NOW())>MONTH(A1),0,IF(MONTH(NOW())>MONTH(A1),1,IF(DAY(NOW())<DAY(A1),1,0)))
 
J

junepbug

My version of Excel does not have the "DATEIF" function. I was bale to cut
and paste the formula in, and it works fine. However it dispays the results
as Xyears, Xmonths, Xdays. I used to have it displayed as a four digit
(##.##) number, which made finding the average age eay. Any suggestions on
how to get that format back?
 
M

Mangesh Yadav

Then you simply need to subtract the earlier date from the recent, and
format as number.
=A1-B1

Mangesh
 
J

junepbug

It comes up as 5545 instead of 58 yrs,7 mos. (58.58). I tried to change the
formating but it's not coming up correctly. Is there anything else I can do?
 
J

junepbug

=DATEDIF(I2,(H2),"y") & " years, " & DATEDIF(I2,(H2),"ym") & "
months, " & DATEDIF(I2,(H2),"md") & " days"

In this case I2 = 11/2/1964 and H2 = 5/2/1996. Formatting cells as a 2
decimal place number fills in "31 years, 6 months, 0 days". Formatting any
other way doesn't return an age.
There was a way to do a "yearif" formula, however since I have had an
upgrade I cannot find that formula. The "yearif" returned 31.50.

Thanks!
 
M

Mangesh Yadav

Ok. So you are looking for the YEARFRAC function.

=YEARFRAC(I2,H2)

which returns 31.5


Mangesh
 
M

Mangesh Yadav

Forgot to mention that you need the Analysis Toolpak to use the YEARFRAC
function.

Mangesh
 
Top