I am entering Date of birth in a cell and i would like to calculate age in
another cell. how to do about it ?
dhanraj, have a look here,
www.cpearson.com/excel/datedif.htm#
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 amp; 2003
quot;DHANRAJquot; gt; wrote in message
...
gt; I am entering Date of birth in a cell and i would like to calculate age in
gt; another cell. how to do about it ?
If the DOB is in B2, =DATEDIF(B2,TODAY(),quot;yquot;) will give you the age.
quot;DHANRAJquot; wrote:
gt; I am entering Date of birth in a cell and i would like to calculate age in
gt; another cell. how to do about it ?
DHANRAJ Wrote:
gt; I am entering Date of birth in a cell and i would like to calculate age
gt; in
gt; another cell. how to do about it ?
=DATEDIF(A1,B1,quot;Yquot;)
Syntax
DATEDIF(start_date,end_date,unit)--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: www.excelforum.com/member.php...oamp;userid=31708
View this thread: www.excelforum.com/showthread...hreadid=529972My DOB is in dd:mm:yy format and when I give the formula I get get a return
value #VALUE!.
quot;bpeltzerquot; wrote:
gt; If the DOB is in B2, =DATEDIF(B2,TODAY(),quot;yquot;) will give you the age.
gt;
gt; quot;DHANRAJquot; wrote:
gt;
gt; gt; I am entering Date of birth in a cell and i would like to calculate age in
gt; gt; another cell. how to do about it ?
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(),quot;yquot;) would
conver the text and then calculate the years that have elapsed since then.
quot;DHANRAJquot; wrote:
gt; My DOB is in dd:mm:yy format and when I give the formula I get get a return
gt; value #VALUE!.
gt;
gt; quot;bpeltzerquot; wrote:
gt;
gt; gt; If the DOB is in B2, =DATEDIF(B2,TODAY(),quot;yquot;) will give you the age.
gt; gt;
gt; gt; quot;DHANRAJquot; wrote:
gt; gt;
gt; gt; gt; I am entering Date of birth in a cell and i would like to calculate age in
gt; gt; gt; another cell. how to do about it ?
- Nov 03 Mon 2008 20:47
To Calculate age in a cell
close
全站熱搜
留言列表
發表留言