Feb 14 2024 09:07 AM
hii everyone, im learning excel from youtube tutorial which uses datedif to calculate age but im not getting that option in my excel. any help would be appreciable.
thank you
Feb 14 2024 09:59 AM
You might find YEARFRAC to be more suitable. From what I read in this link DATEDIF is a function brought over from Lotus 1-2-3, so though it usually should work, it's not really an Excel function, whereas YEARFRAC is.
=INT(YEARFRAC(A1,B1)) will yield the age as an integer.
Feb 14 2024 01:27 PM
One gets no help with this deprecated function but
= DATEDIF(dob, today, {"y","ym"})
would still give ages in years and months. The alternative
= INT(YEARFRAC(+dob, today))
works fine, but it is one of the functions in which the range of birthdates needs to be converted to an array using "+" or "--" for some obscure reason.
Feb 14 2024 02:30 PM
The alternative
= INT(YEARFRAC(+dob, today))
works fine, but it is one of the functions in which the range of birthdates needs to be converted to an array using "+" or "--" for some obscure reason.
Not in my experience.
It didn't need the "+" or "--" when I tested it before replying. See below. [Cell B1 contains =TODAY() ]
Feb 14 2024 03:14 PM
As it stands, your formula works fine. It is
= INT(YEARFRAC(A1:A10, B1))
that becomes a problem. I have been caught out a number of times by this generation of time functions that appear to be perfectly formed but fail given multi-cell range references.
Apr 20 2024 10:08 AM
to calculate the age in excel check this video
Mastering Age Calculations in Excel https://youtube.com/shorts/XeIV8yeTTTk?feature=share
Sep 12 2024 01:49 PM
@Abhishek_Verma
This works best for me. In my sheet where column 'C' contains DOB.
=INT(YEARFRAC(C5, TODAY()))