How To Calculate Age In Excel

Table of contents:

How To Calculate Age In Excel
How To Calculate Age In Excel

Video: How To Calculate Age In Excel

Video: How To Calculate Age In Excel
Video: How to Calculate Age Using a Date of Birth in Excel (The Easy Way) 2024, May
Anonim

Microsoft Office Excel, Gnumeric, and OpenOffice.org Calc software packages not only allow you to create and edit spreadsheets, but also perform calculations. You can, for example, enter the years of birth of the people listed in the list and automatically calculate their ages.

How to calculate age in Excel
How to calculate age in Excel

Instructions

Step 1

Leave one cell in the table for the number of the current year. Enter the appropriate number there (must be four-digit, not abbreviated two-digit). In all of the examples below, the current year will be assumed to be entered in cell A1.

Step 2

You can also make the current year be set automatically. Then the value of the corresponding cell need not be manually modified annually, but the calculations will be carried out correctly only if the clock and calendar are correctly set in the computer. To do this, use the following formula: = year (today ()) in Russian or = year (today ()) - in English. In the Gnumeric program, hereinafter, use the operators in English, even if the program interface itself is Russified.

Step 3

In the cell where the person's age should be, enter the following expression: = A1-Xn, where Xn is the cell where the person's year of birth is located. For example, if it is located in cell B4, then the expression will look like: = A1-B4.

Step 4

This method is inconvenient in that the dates of birth of all people listed in the table are taken for January 1, and the age is calculated without taking into account the fact that birthdays can also fall on the middle or end of the year. To calculate your age more accurately, put the current date in cell A1 in the same format as the office suite you are using (these settings can be changed). For example, if the date format is dd / mm / yyyy and today is April 6, 2012, enter 2012-04-06 in this cell. Please note that in this case you will have to manually change the contents of this cell every day. To avoid this, enter this expression into it: = today () or = today (). In this case, as in the previous case, make sure that the clock and calendar are correctly set in the computer.

Step 5

Instead of the person's year of birth, indicate in the appropriate cell his date of birth in the format for which the office suite is configured. And in the cell in which the automatically calculated age should be indicated, enter the following expression: = datedif (A1; Xn; "y") or = dated (A1; Xn; "y"). For example: = datedif (A1; B4; "y"). The letter y is Latin in both cases.

Recommended: