23.08.2023 Views

CFI-Excel-eBook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Corporate Finance Institute Excel

Example 2

Let’s assume we are handling the HR department. We need to calculate a

person’s age from their birth date. It can be done by using the YEARFRAC, INT,

and TODAY functions. In the generic version of the formula above, birthdate is

the person’s birthday with the year, and TODAY supplies the date on which to

calculate age. As the formula uses the TODAY function, it will continue to

calculate the correct age in the future as well. Suppose we are given the

following data:

The formula used was:

To work out the fraction of a year as a decimal value, Excel will use whole days

between two dates. As all dates are simply serial numbers, the process is

straightforward in Excel.

Hence, in this case, we provided birthdate as the start_date from cell B3, and

today’s date is supplied as the end_date by using the TODAY function.

After that, the INT function takes over and rounds down the number to its

integer value.

corporatefinanceinstitute.com

58

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!