Forum Discussion
Abhishek_Verma
Feb 14, 2024Copper Contributor
how to calculate age in excel
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
PeterBartholomew1
Feb 14, 2024Silver Contributor
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.
mathetes
Feb 14, 2024Silver Contributor
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() ]