login about faq

I have a list containing dates of birth going from cell A1 to cell A1765 and need to calculate the ages.

So far I have a row of formulas B1 to B1765 subtracting the dates of birth from todays date. Then I have a row of formulas from C1 to C1765 dividing the number of days by 365 with the cells formatted to show no decimal places to give the number of years.

I now need to calculate the months and years so for example the age of someone born on 01/12/1980 would be 31 years 2 months and 19 days

I am thinking of taking the results from column C multiplying them by 365 then subtracting them from the total number of days then dividing by 30 for number of months but this is getting complicated and it doesnt account for months that have more or less than 30 days.

asked Feb 20 '12 at 05:51

Abby's gravatar image

Abby
1966915

Beside the months with more or less then 30 days, you are also forgetting the leap years. I don't think the formula's are accurate.

But I also don't have an answer.

(Feb 20 '12 at 06:54) Beyond_Life Beyond_Life's gravatar image

Wow Abby, that is quite a convoluted way of doing this and like Beyond_Life says it wont be accurate.

The =DATEDIF(birthdate,date,"Y") formula will calculate the years but you will also need to use =DATEDIF(birthdate,date,"YM") to calculate the months and =DATEDIF(birthdate,date,"MD") to calculate the days.

you can use each formula in a separate column 1 for years 1 for months and 1 for days or you can combine all three into a single column with the text Years Months Days after each figure.

You say that your list range is from A1 to A1765 so copy and paste the following formula into cell B1 and then copy it down to cell B1765.

=DATEDIF(A2,TODAY(),"Y") & " Years, " & DATEDIF(A2,TODAY(),"YM") & " Months, " & DATEDIF(A2,TODAY(),"MD") & " Days"

This will work out all the ages to years, months and days and will only take up 1 column

link

answered Feb 20 '12 at 07:55

Simon%20H's gravatar image

Simon H
5.0k62683

edited Feb 20 '12 at 14:56

Wow... you guys are Excel Kung FU artists! +1 to Simon!

(Feb 20 '12 at 11:53) ShockerSH ShockerSH's gravatar image

Thank you so much guys it works fab.

(Feb 21 '12 at 06:55) Abby Abby's gravatar image

I was to fast with my previous comment. Try this:

To calculate the age of a person on date since their birthdate: =INT((date-birthdate)/365.25)

To figure their age as of today, date can be replaced with a function like TODAY() or NOW(). The INT() function is used to return only the number of complete years.

To calculate age in terms of years, months, and days, DATEDIF is a handy function. The following formula is similar to the one above. =DATEDIF(birthdate,date,"y")

link

answered Feb 20 '12 at 06:59

Beyond_Life's gravatar image

Beyond_Life
1.4k424874

Simon, I like your formula but why would you use your references to $Z$1 rather than "today()" throughout the formula?

Thx, Rick

link

answered Feb 20 '12 at 09:07

RShores's gravatar image

RShores
241127

Good point, I guess its just force of habit from when I was first taught to use Excel. I think it would be better to use "today()" throughout the formula and will edit the answer.

(Feb 20 '12 at 14:54) Simon H Simon%20H's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:
    [text](http://url.com/ "title")
  • image:
    ![alt text](/path/img.jpg "title")
  • numbered list:
    1. Foo
    2. Bar
  • Code:
    • Within a paragraph:
      `code`
      surround code with grave accents (backticks)
    • Code snippet:
      Select the text and use the button on the icon of zeros and ones
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×17
×1

Asked: Feb 20 '12 at 05:51

Seen: 4,435 times

Last updated: Feb 21 '12 at 06:55

groovyAnswers © 2007 - 2011 All Rights Reserved | Privacy | Contact