#1   Report Post  
devinm21
 
Posts: n/a
Default Calculating Age

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


Thanks!

  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

You can use the DATEDIF function. E.g.,

=DATEDIF(birthdate,TODAY(),"y")

See www.cpearson.com/excel/datedif.htm for more information about
DATEDIF.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"devinm21" wrote in message
...
If I have a person's birthday, how can I calculate their
current age based on
today's date?


Thanks!



  #3   Report Post  
ertug
 
Posts: n/a
Default



"devinm21" wrote:

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


Thanks!

  #4   Report Post  
Vic Sowers
 
Posts: n/a
Default


"ertug" wrote in message
...


"devinm21" wrote:

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


Thanks!


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)))


  #5   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 9 Jun 2005 04:54:09 -0500, "Vic Sowers"
wrote:


"ertug" wrote in message
...


"devinm21" wrote:

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


Thanks!


In whole years:


Somewhat shorter formula:

=DATEDIF(A1,TODAY(),"y")


--ron


  #6   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

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


Thanks!


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)))




  #7   Report Post  
junepbug
 
Posts: n/a
Default

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?

"Mangesh Yadav" wrote:

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

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


Thanks!


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)))





  #8   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

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

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

If I have a person's birthday, how can I calculate their current

age
based on
today's date?


Thanks!


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)))







  #9   Report Post  
junepbug
 
Posts: n/a
Default

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?

"Mangesh Yadav" wrote:

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

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

If I have a person's birthday, how can I calculate their current

age
based on
today's date?


Thanks!


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)))








  #10   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

Could you post your data.
And the formula you are using.

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

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

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

If I have a person's birthday, how can I calculate their

current
age
based on
today's date?


Thanks!


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)))












  #11   Report Post  
junepbug
 
Posts: n/a
Default

=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!

"Mangesh Yadav" wrote:

Could you post your data.
And the formula you are using.

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

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

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

If I have a person's birthday, how can I calculate their

current
age
based on
today's date?


Thanks!


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)))











  #12   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

Ok. So you are looking for the YEARFRAC function.

=YEARFRAC(I2,H2)

which returns 31.5


Mangesh




"junepbug" wrote in message
...
=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!

"Mangesh Yadav" wrote:

Could you post your data.
And the formula you are using.

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

Then you simply need to subtract the earlier date from the recent,

and
format as number.
=A1-B1

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

If I have a person's birthday, how can I calculate their

current
age
based on
today's date?


Thanks!


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)))













  #13   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

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

Mangesh


"junepbug" wrote in message
...
=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!

"Mangesh Yadav" wrote:

Could you post your data.
And the formula you are using.

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

Then you simply need to subtract the earlier date from the recent,

and
format as number.
=A1-B1

Mangesh



"junepbug" wrote in message
...
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?

"Mangesh Yadav" wrote:

There's been a big discussion on this already.

http://excelforum.com/showthread.php...light=bluenose

Mangesh



"Vic Sowers" wrote in message
...

"ertug" wrote in message
...


"devinm21" wrote:

If I have a person's birthday, how can I calculate their

current
age
based on
today's date?


Thanks!


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)))













Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating growth with negative numbers Tsipi4me Excel Worksheet Functions 3 April 3rd 23 12:12 PM
calculating timesheet, time-in/time-out = total hours & minutes, . Steve Lindsay Excel Worksheet Functions 13 November 8th 06 03:45 PM
Formulas not calculating??? J Dizzle Fizzle Excel Discussion (Misc queries) 1 December 31st 04 07:47 PM
calculating averages keving Excel Worksheet Functions 8 December 9th 04 01:23 AM
Periodic Calculating Peter B Excel Worksheet Functions 1 December 8th 04 09:31 AM


All times are GMT +1. The time now is 11:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"