ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Age calculation (https://www.excelbanter.com/excel-discussion-misc-queries/78628-age-calculation.html)

Clash

Age calculation
 

Hi, all.

This one has been bugging me for the last two hours.

I am trying to calculate someones age from their DOB, this I have done
using this formula; =year(today()-A1)-1900, which was kindly given to
me here.

But my boss has just thrown me a curve ball, and asked if I can show
years & months. All I can come up with is years and percentage of year,
I did this by custom formatting. But instead of, say 4 months, it shows
.25 months.

Any help would be great.:confused:


--
Clash
------------------------------------------------------------------------
Clash's Profile: http://www.excelforum.com/member.php...o&userid=18951
View this thread: http://www.excelforum.com/showthread...hreadid=524730


Ardus Petus

Age calculation
 
My original formula goes false in some cases.
You shoul use

=DATEDIF(A1,TODAY(),"y") to get the number of years
=DATEDIF(A1,TODAY(),'"ym") to get the extra months

HTH
--
AP

"Clash" a écrit dans le
message de ...

Hi, all.

This one has been bugging me for the last two hours.

I am trying to calculate someones age from their DOB, this I have done
using this formula; =year(today()-A1)-1900, which was kindly given to
me here.

But my boss has just thrown me a curve ball, and asked if I can show
years & months. All I can come up with is years and percentage of year,
I did this by custom formatting. But instead of, say 4 months, it shows
25 months.

Any help would be great.:confused:


--
Clash
------------------------------------------------------------------------
Clash's Profile:

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




Chip Pearson

Age calculation
 
See www.cpearson.com/excel/datedif.htm

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


"Clash"
wrote in message
...

Hi, all.

This one has been bugging me for the last two hours.

I am trying to calculate someones age from their DOB, this I
have done
using this formula; =year(today()-A1)-1900, which was kindly
given to
me here.

But my boss has just thrown me a curve ball, and asked if I can
show
years & months. All I can come up with is years and percentage
of year,
I did this by custom formatting. But instead of, say 4 months,
it shows
25 months.

Any help would be great.:confused:


--
Clash
------------------------------------------------------------------------
Clash's Profile:
http://www.excelforum.com/member.php...o&userid=18951
View this thread:
http://www.excelforum.com/showthread...hreadid=524730





All times are GMT +1. The time now is 02:21 AM.

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