Calculating Age with a Year and Date of Birth - Strange Results

QBERT

New Member
Joined
Oct 13, 2004
Messages
40
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
I have a Date of Birth and a Current Season Year and am using the =DATEDIF(Date of Birth, Year, "y") formula to calculate age. For some reason I cannot figure out it works fine for half of my 500,000 row data set. But the last 250,000 points do not work. Here is an example

Column 1: Date of Birth "11/13/75" = This is a VLOOKUP from another tab that is formatted as a date.
Column 2: Season "2001"
Column 3: Age. This returns a value of 70 years old, which is not correct. The formula for the calc is listed above using DATEDIF formula.

Column 1 is formatted as Date
Column 2 is formatted as General
Column 3 is formatted as General

Please advise. Thanks.

Q
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
If all you have is the year in column 2 try:
Column2-YEAR(column1)

See example below:
The reason you are getting 70 is your date 11/13/75 is actually a number of 27711 (general format).
When DATEDIF subtracts the year 2001 it gets 24710. then when you divide that by 365 you get 70 years.

Book1
ABC
1General Formate
2Date11/13/197527711
3Year200125710
4Divide by36570.44
5
626
Sheet1
Cell Formulas
RangeFormula
C2C2=B2
C3C3=C2-B3
C4C4=C3/365
B6B6=B3-YEAR(B2)
 
Upvote 0
Thanks! I made that correction and now my actual age calculation gives me a NUM error. I am looking at formats to make sur everything is Date except for the calculation answer.
 
Upvote 0
Thanks! I made that correction and now my actual age calculation gives me a NUM error. I am looking at formats to make sur everything is Date except for the calculation answer.
Solved. Thank you for your help everyone!

Q
 
Upvote 0
You're welcome, glad you worked it out.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top