Posts with the tag excel:

How to Calculate Age in Microsoft Excel

In the cell of age, write this =INT((TODAY()-B2)/365) where B2 is the location of the cell where the date of birth written. This code just caclulate the number of years passed. So you know the age of this person in years. But what if I want to know the months and days too ? To get the age in years, use =DATEDIFF(dateOfBirth, TODAY(), "Y") and replace dateOfBirth by the location of the cell where the birthday are written. To get the age in months, use =DATEDIFF(B2, TODAY(), "YM") where B2 is the cell where the birth date written. To get the age in days, use =DATEDIFF(B2, TODAY(), "MD") where B2 is the date of birth.