Calculate age only when both dates present

MeredithD26

New Member
Joined
May 20, 2022
Messages
3
Office Version
  1. 2013
Platform
  1. Windows
I have 2 dates (date of birth (A2), and a start date(B2)) and am trying to calculate age at time of start date. This is the formula I am using to ensure it's only calculated if both dates are present: =IF(AND(B2<>"",A2<>""),(B2-A2)/365.25). However, I want to have the value round down (31 in this case) since it's an age. Any help would be appreciated. Thanks.

DOBEnrollAge
3/4/1990​
1/1/2022​
31.83025​
3/5/1997​
1/1/2022​
24.82683​
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Welcome to the MrExcel forum!

Try:

Book1
ABC
1DOBEnrollAge
23/4/19901/1/202231
33/5/19971/1/202224
41/1/2022 
55/5/1955 
Sheet13
Cell Formulas
RangeFormula
C2:C5C2=IF(COUNT(A2:B2)=2,DATEDIF(A2,B2,"y"),"")
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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