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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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