ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   calculating an age (https://www.excelbanter.com/excel-discussion-misc-queries/28404-calculating-age.html)

rocket0612

calculating an age
 

I have 2 cells, A1 were a date will be input and A2 were a date of birth
will be input. I then have cell A3 were I would like it to show the
someone's age next birthday at date in the cell A1. For example:

A1 = 1 May 2005
A2 = 15 June 1950 (date of birth)
A3 = 55

so on 1 May 2005, the age next birthday of the individual is 55.

all help appreciated, thanks


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=375004


Ragdyer

You can use the DATEDIF() function.
Except in XL2k, however, that's an undocumented function.

You can find it fully explained on Chip Pearson's web site at:

http://www.cpearson.com/excel/datedif.htm
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------


"rocket0612" wrote
in message ...

I have 2 cells, A1 were a date will be input and A2 were a date of birth
will be input. I then have cell A3 were I would like it to show the
someone's age next birthday at date in the cell A1. For example:

A1 = 1 May 2005
A2 = 15 June 1950 (date of birth)
A3 = 55

so on 1 May 2005, the age next birthday of the individual is 55.

all help appreciated, thanks


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile:

http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=375004



mangesh_yadav


=ROUNDUP(YEARFRAC(B1,A1),0)

You need to enable the Analysis ToolPak to use this function. To do
this, Tools Addins. Check the box Analysis ToolPak

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=375004


rocket0612


Thanks, I found a way using dateif from
http://www.cpearson.com/excel/datedif.htm#Age, but your way is much
easier, thanks alot :)


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=375004


mangesh_yadav


Thanks for the feedback. I have seen the link you mentioned.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=375004


Mangesh Yadav

Hi Ragdyer (Also to Chip Pearson),

I was going through the link you mentioned, and saw the age calculation
formula. It is not fool-proof. It fails at the following case:

31-Jan-2000 1-Mar-2005 5 1 -2


It shows the days as -2

Mangesh



"Ragdyer" wrote in message
...
You can use the DATEDIF() function.
Except in XL2k, however, that's an undocumented function.

You can find it fully explained on Chip Pearson's web site at:

http://www.cpearson.com/excel/datedif.htm
--
HTH,

RD

--------------------------------------------------------------------------

-
Please keep all correspondence within the NewsGroup, so all may benefit !
--------------------------------------------------------------------------

-


"rocket0612"

wrote
in message ...

I have 2 cells, A1 were a date will be input and A2 were a date of birth
will be input. I then have cell A3 were I would like it to show the
someone's age next birthday at date in the cell A1. For example:

A1 = 1 May 2005
A2 = 15 June 1950 (date of birth)
A3 = 55

so on 1 May 2005, the age next birthday of the individual is 55.

all help appreciated, thanks


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile:

http://www.excelforum.com/member.php...o&userid=19492
View this thread:

http://www.excelforum.com/showthread...hreadid=375004





Ron Rosenfeld

On Mon, 30 May 2005 03:48:01 -0500, rocket0612
wrote:


I have 2 cells, A1 were a date will be input and A2 were a date of birth
will be input. I then have cell A3 were I would like it to show the
someone's age next birthday at date in the cell A1. For example:

A1 = 1 May 2005
A2 = 15 June 1950 (date of birth)
A3 = 55

so on 1 May 2005, the age next birthday of the individual is 55.

all help appreciated, thanks


=YEAR(DATE(YEAR(A1)+(A1DATE(YEAR(A1),MONTH(
A2),DAY(A2))),MONTH(A2),DAY(A2)))-YEAR(A2)


--ron


All times are GMT +1. The time now is 12:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com