Jump to content
groovyPost Forums

calculate ages in excel


Abby
Go to solution Solved by Simon H,

Recommended Posts

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.

Link to comment
Share on other sites

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.

 

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.

Link to comment
Share on other sites

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 to comment
Share on other sites

  • Solution

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 to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

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

 

Thank you so much guys it works fab.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Steve
      Question from Reader - Email Form
       
       
      Hi Tom,
       
      Ouch. I know how it feels losing a days worth of work. The worst part is when you have to recreate what you've already done.
       
      To answer your question, when you found the Entry "OutlookSecureTempFolder" what was the path in the DATA column? I assume you reviewed this post here to find it. It looks like you found the registry key entry so your more than 1/2 way there. Find that key again and you should have the path to your OLK folder and your Excel should be sitting there.
       
      Now the path might be a bit confusing because with Outlook 2007, there actually is "NOT" an OLK folder. For instance, on my XP/Outlook 2007 install, my OLK folder or "Temp Outlook Folder" / "OutlookSecureTempFolder" is:
       
      c:\Documents and Settings\mrgroove\Local Settings\Temporary Internet Files\Content.Outlook\4V32TZLP  
      So if you look on your box you will find what your looking for in the "Content.Outlook" folder. Take a look there and your golden.
       
      More reading can be found here also on the Outlook OLK folder location:
      http://www.groovypost.com/howto/microsoft/outlook/find-the-microsoft-outlook-temporary-olk-folder/
       
      Thnx!
    • By micalhassey
      I want to best solution for recovering Excel sheet password because I don’t remember my Excel file password please any one suggest me to remove my Excel file password….Thanks
    • By shockersh
      Quick question for you groovy excel ppl out there. I'm working with a vendor and need to calculate the discount and/or increase. I know there is a simple excel formula I can use. Just looking for a tip for it.
      Thanks!
    • By Beyond_Life
      My dad wants me to make him a excel sheet with all different formula's in it. No problem, I can make those. But in the sheet, the first cells are used for a name from his client, and the second cell is used for a date.
      Q: Is it possible to make Excel use those to cells to create the filename of the sheet when it saves?
    • By Austin
      Beatrice writes:

      I have a question, I know how to do a data validation drop down but I need the one list with two buttons in the same cell and a range of years.Do you know how to do this?
      I work for the school district and they need a particular calendar. They have a cell where you can list the year but it list whole number with a range of 1999 to 2999 and has two buttons.... one to go up in years and one to go lower... Hope this makes sense
  • Who's Online   0 Members, 0 Anonymous, 8 Guests (See full list)

    There are no registered users currently online

×
×
  • Create New...