How time flies. Do you know how long has 2022 passed? There is a built-in function in Excel called the YEARFRAC function. so, let’s explain how to use the Excel YEARFRAC function.
Syntax
=YEARFRAC (start_date, end_date, [basis])
start_date: This is the start of the period. It should be entered as a serial date, not a text date.
end_date: This is the end of the period. It should be entered as a serial date, not a text date.
[basis]: (optional) It is the basis used to calculate the year fraction. It can be one of the following values:
How to use the YEARFRAC function?
Let’s take an example.
Let’s take the basis as 1 here.
We can know that 2020 has passed more than a half.
And the YEARFRAC function returns a numeric value.
Note:
#NUM! error
It occurs when the given basis argument is less than 0 or greater than 4.
#VALUE! Error
It occurs when the start_date or end_date arguments are not valid dates or the given [basis] argument is non-numeric.
Leave a Reply