#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 104
Default Calculate age

Hello,

I am looking for a formula that will calculate how old a person is in years
and months, with months being rounded up to the nearest complete month. If
somebody was born yesterday, I would like the formula to return "0 years, 1
month".

I was 'experimenting' with:

=DATEDIF(E10,NOW(),"y") & " years, " & ROUNDUP(DATEDIF(E10,NOW(),"ym"),0) &
" months"

and while this is close, it's not right.
--
Any assistance appreciated,
MarkN
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 470
Default Calculate age

Check this link out. It won't give you the rounded command, but it will get
you started.

http://cpearson.com/excel/datedif.htm

Les



"MarkN" wrote:

Hello,

I am looking for a formula that will calculate how old a person is in years
and months, with months being rounded up to the nearest complete month. If
somebody was born yesterday, I would like the formula to return "0 years, 1
month".

I was 'experimenting' with:

=DATEDIF(E10,NOW(),"y") & " years, " & ROUNDUP(DATEDIF(E10,NOW(),"ym"),0) &
" months"

and while this is close, it's not right.
--
Any assistance appreciated,
MarkN

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Calculate age

Mark,
ROUNDUP would not work in this case anyway, since DATEDIF(,,"ym")
returns an integer. I am supplying a solution involving IF(), if I
understand your philosophy correctly.

=DATEDIF(E10,NOW(),"y") & " years, " &
DATEDIF(E10,NOW(),"ym")+IF(DATEDIF(E10,NOW(),"yd") 0,1,0) & " months"

Does this help?
Kostis Vezerides


MarkN wrote:
Hello,

I am looking for a formula that will calculate how old a person is in years
and months, with months being rounded up to the nearest complete month. If
somebody was born yesterday, I would like the formula to return "0 years, 1
month".

I was 'experimenting' with:

=DATEDIF(E10,NOW(),"y") & " years, " & ROUNDUP(DATEDIF(E10,NOW(),"ym"),0) &
" months"

and while this is close, it's not right.
--
Any assistance appreciated,
MarkN


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Calculate age

Hi Mark

Then use
=DATEDIF(E10,NOW(),"y") & " years, " &DATEDIF(E10,NOW(),"ym")+1 & "
months "

Obviously, as you are rounding up it will be overstating by a complete
month on 12 days of the year and will give the answer of 5 years 12
months for example, once someone passes the 11th month.

You could use some form of conditional test to the addition of the 1 if
required.

--
Regards

Roger Govier


"MarkN" wrote in message
...
Hello,

I am looking for a formula that will calculate how old a person is in
years
and months, with months being rounded up to the nearest complete
month. If
somebody was born yesterday, I would like the formula to return "0
years, 1
month".

I was 'experimenting' with:

=DATEDIF(E10,NOW(),"y") & " years, " &
ROUNDUP(DATEDIF(E10,NOW(),"ym"),0) &
" months"

and while this is close, it's not right.
--
Any assistance appreciated,
MarkN



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 104
Default Calculate age

Thanks for the solutions and explanations, both do exactly what I need
--
Thanks again,
MarkN


"Roger Govier" wrote:

Hi Mark

Then use
=DATEDIF(E10,NOW(),"y") & " years, " &DATEDIF(E10,NOW(),"ym")+1 & "
months "

Obviously, as you are rounding up it will be overstating by a complete
month on 12 days of the year and will give the answer of 5 years 12
months for example, once someone passes the 11th month.

You could use some form of conditional test to the addition of the 1 if
required.

--
Regards

Roger Govier


"MarkN" wrote in message
...
Hello,

I am looking for a formula that will calculate how old a person is in
years
and months, with months being rounded up to the nearest complete
month. If
somebody was born yesterday, I would like the formula to return "0
years, 1
month".

I was 'experimenting' with:

=DATEDIF(E10,NOW(),"y") & " years, " &
ROUNDUP(DATEDIF(E10,NOW(),"ym"),0) &
" months"

and while this is close, it's not right.
--
Any assistance appreciated,
MarkN






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Calculate age

Thank you so much!!!!
this link is really helpful.. Previously, i counted the age by =A2-A1/365,
but it didn't appear correctly as it rounded the 10-12 months as decimals.

I solved my problem with this link.. :)

Thank you very much..

Cheers

"WLMPilot" wrote:

Check this link out. It won't give you the rounded command, but it will get
you started.

http://cpearson.com/excel/datedif.htm

Les



"MarkN" wrote:

Hello,

I am looking for a formula that will calculate how old a person is in years
and months, with months being rounded up to the nearest complete month. If
somebody was born yesterday, I would like the formula to return "0 years, 1
month".

I was 'experimenting' with:

=DATEDIF(E10,NOW(),"y") & " years, " & ROUNDUP(DATEDIF(E10,NOW(),"ym"),0) &
" months"

and while this is close, it's not right.
--
Any assistance appreciated,
MarkN

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
can't get excel to calculate jack Excel Worksheet Functions 1 August 29th 06 04:36 AM
any formula to auto calculate 1st-12th is 12 days pls? Kelly Lim Excel Discussion (Misc queries) 13 June 17th 06 09:25 AM
How do I calculate hours in Excel Bobbi Prochnow [MSFT] New Users to Excel 0 October 31st 05 07:51 PM
Calculate Interest Rate when payment changes! huntermcg Excel Worksheet Functions 2 October 25th 05 08:32 AM
Spreadsheet Won't Calculate Scott Excel Discussion (Misc queries) 0 September 29th 05 05:37 PM


All times are GMT +1. The time now is 03:52 PM.

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

About Us

"It's about Microsoft Excel"