To Calculate age in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am entering Date of birth in a cell and i would like to calculate age in
another cell. how to do about it ?
 
If the DOB is in B2, =DATEDIF(B2,TODAY(),"y") will give you the age.
 
DHANRAJ said:
I am entering Date of birth in a cell and i would like to calculate ag
in
another cell. how to do about it ?

=DATEDIF(A1,B1,"Y")

Syntax

DATEDIF(start_date,end_date,unit
 
My DOB is in dd:mm:yy format and when I give the formula I get get a return
value #VALUE!.
 
I'm not sure I understand. If you've entered a date, the datedif function
should work. If you've entered TEXT with the :'s etc, you first need to
convert to true Excel dates:
=DATE(RIGHT(B2,2),MID(B2,4,2),LEFT(B2,2)) would convert the text string to a
date (assuming that you've ALWAYS got two chars each for mm, dd and yy).
So =datedif(DATE(RIGHT(B2,2),MID(B2,4,2),LEFT(B2,2)),today(),"y") would
conver the text and then calculate the years that have elapsed since then.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top