Date Comparison error

DPChristman

Board Regular
Joined
Sep 4, 2012
Messages
139
I have a strange error that I am running into with trying to determine the age of an employee.

The formula I have in place is =SUM(NOW()-H5)/365, where H5 is the date of birth.

The formula works most of the time, but then I get these odd incorrect responses.

I have added multiple decimal points to try and get the age as accurate as possible, and still getting these errors.

Example using today's date (10/26/2020), and a birth date of 11/1/1990, the formula returns a value of 30.007.

This is clearly wrong. Does anyone know a fix or have a better formula for this?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,200
Office Version
  1. 365
Platform
  1. Windows
Ok, how about
Excel Formula:
=DATEDIF(H2,TODAY(),"Y")
 
Solution

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,200
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,126,888
Messages
5,621,430
Members
415,839
Latest member
Pollydooner

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
Top