Calculate Your Age with excel

DATEDIF


The DATEDIF function calculates the difference between two dates. It can show the result in weeks, months or years. in below example and the syntax you can calculate the age of the person in years month, days as shown in the B3 cell and the syntax of same in C3 cell respectively.

DATEIF.JPG

Example: Calculate Your Current Age with DATEDIF

Enter your birth date into cell B2 of the excel sheet
Type =TODAY( ) into cell B1. (Optional). Displays the current date as seen in the image above, This is for your reference only, this data is not used by the DATEDIF formula below.  Type the following formula into cell B3
=DATEDIF (B2, TODAY( ),"Y") & " Years, " & DATEDIF (B2, TODAY( ),"YM") & " Months, "& DATEDIF (B2, TODAY( ),"MD") & " Days"

Note: When entering text data into a formula it must be enclosed in double quotation marks such as "Years." and months

Your current age should appear in cell B3 of the excel sheet.
When you click on cell B3 the complete function appears in the formula bar above the excel sheet

If you want to calculate the age in years then below formula
Age in years=DATEDIF(B2,TODAY(),"Y")&" Years"
Age in months =DATEDIF(B2,TODAY(),"M")&" Months"
Age in Days =DATEDIF(B2,TODAY(),"D")&" Days"

0 Comments

Please do not spam

Subscribe

Fill in all informations