Tech Support Guy banner
  • Please post in our Community Feedback thread for help with the new forum software! If you are having trouble logging in, please Contact Us for assistance.
Status
Not open for further replies.
1 - 10 of 10 Posts

·
Registered
Joined
·
3 Posts
Discussion Starter · #1 ·
How do I calculate age from a date of birth in excel? The output must be in the form of a whole number from which I can calculate mean age etc..
 

·
Registered
Joined
·
2,056 Posts
i had a more complicated version, using today, year functions, not a one stepper by any means (4 steps really)

just a comment: given the usual time lag with demographic data, you might want to consider using a constant for your current year instead of a now or today function depending on the time period your stats are covering.

ie
mean age in 2000 using 2000 data would be wrong if you used now/today functions in your calculations, any more wrong in another month when your PC's date switches to 2002.
 

·
Registered
Joined
·
3 Posts
Discussion Starter · #4 ·
Thank you 'Dreamboat' but unfortunately I couldn't get that to work (I've never encountered people that old!). Jbcalg - details of your four steps would be appreciated.
 

·
Registered
Joined
·
2,056 Posts
i assumed you were working with a mm/dd/yy date format

first convert to mm/dd/yy to year
find today's date (see comments in previous post)
convert to 4 digit year
subtract

here's the orig:
here's a complicated way LOL

dob in col A
convert dob to number in col B using YEAR function
today's date function in col C using TODAY
convert current date to year in col D using YEAR
[edit] subtract B from D in col E

you can do calculations with col E but it's formula, not a number/integer,
so you might want to - copy/paste special, value - col E to get a value to use in your calculations

there's likely easier ways to do it, and i'd probably throw all this into a lookup type sheet, then just have the final age integer to work with on a main cal sheet

here's a pic of the calcs and the formulas - formulas apply to row 3, copy down for subsequent rows (could probably use a $ ref for the converted current year)
 

Attachments

1 - 10 of 10 Posts
Status
Not open for further replies.
Top