YEARFRAC function - The function returns the fifth calculated by the number of whole days between two specific dates in Excel
The following article introduces you to the YEARFRAC function - one of the functions in the date and time group function is very popular in Excel.
Description: The function returns the fifth as a whole number of days between two specific dates in Excel.
Syntax: YEARFRAC (start_date, end_date, [basis])
Inside:
- start_date: The start date to calculate the number of years, is a required parameter.
- end_date: The desired date to calculate the number of years, is a required parameter.
- basis: The basis for determining how to count dates, is an optional parameter including the following values:
+ basis = 0 -> Base counting days in US (NASD) 30/360.
+ basis = 1 -> Basis counting days is the actual number of days / actual year.
+ basis = 2 -> The basis of counting days is the number of actual days / 1 year 360 days.
+ basis = 3 -> Basis for counting days is the actual number of days / year with 365 days.
+ basis = 4 -> Base counting days according to EUROPEAN 30/360.
Attention:
- Excel stores the date as a serial number to facilitate the calculation process.
- All function arguments, if it is a decimal -> are truncated to integers.
- If the value of start_date, end_date is not a valid date -> the function returns the #VALUE! Error value
- If basis is outside of values 0 to 4 -> the function returns the #NUM! Error value
For example:
Calculate the number of years corresponding to the following time period:
- In the cell to calculate enter the formula: = YEARFRAC (E7, F7, G7).
- Press Enter -> the value corresponding to the above 2 dates is:
- Similarly copying the formula for the remaining values results:
- Where the basis value is outside the scope of its values -> the function returns the #NUM! Error value
Above are instructions and some specific examples when using the YEARFRAC function in Excel.
Good luck!
You should read it
- DAYS360 function - The function returns the number of days between 2 dates, based on 360 days in Excel
- NETWORKDAYS.INTL function - The function returns the number of whole working days between 2 dates, specifying weekends in Excel
- DATEDIF function - The function calculates the number of days, months, years between 2 dates in Excel
- How to calculate the number of days in Excel
- DAYS function, how to use the function to calculate the number of days between two time points in Excel
- POISSON.DIST function - The function returns the Poisson distribution in Excel
- TIME function - Function returns decimal numbers for a specific time value in Excel
- POISSON function - The function returns the Poisson distribution in Excel
May be interested
- DAYS360 function - The function finds the number of days between two dates based on a 360-day year in Excelthe days360 function is used to calculate days based on a year of only 360 days. the function is usually used to calculate payments if your accounting system is based on a 360-day year.
- POISSON.DIST function - The function returns the Poisson distribution in Excelpoisson.dist function: the function returns the poisson distribution, the application function to predict the number of events in a specific time. support functions from excel 2013 onwards. syntax: poisson.dist (x, mean, cumulative)
- How to calculate the number of days between two time points extremely quickly using Excelcalculating the number of days between two dates in excel is not difficult. here is a super fast way to calculate the number of days between two dates in excel that you cannot ignore.
- POISSON function - The function returns the Poisson distribution in Excelin predicting the number of events that occur within a specific time, one cannot help but use the poisson function. the following article details how to use the poisson function, the function returns the poisson distribution.
- DAY function - The function returns the date value of a specific date in Excelthe day function: the function returns a date value in a specific date, month, and year format in excel. syntax: day (serial_number)
- How to subtract dates, months, and years in Excel - Calculate the distance between two dates in Excelin the process of processing data in excel you need to subtract days, months and years in excel. you do not know how to calculate and use what function? so invite you and tipsmake.com to learn how to calculate the distance between two dates in excel, except for days, months and years in excel below.
- COUPNUM function - The function returns the number of interest payments on a security in Excelin the process of investing in securities, paying special interest is very important. it helps you calculate and plan a reasonable calculation and investment. the following article details the coupnum function - the function returns the number of interest payments of securities in excel.
- PERMUT function - The function returns the number of permutations of a given number of objects in Excelpermut function: the function returns the number of permutations of a given object. permutations are subsets of values where the position and number of elements in permutations are different. syntax: permut (number, number_chosen)
- The WORKDAY.INTL function - The function returns a date before or after the date starting with a custom weekend in Excelworkday.intl: the function returns a date before or after the start date of a specified number of working days with a custom weekend. the weekend parameter indicates which day and how many days. syntax: workday (start_date, days, [weekend], [holidays])
- RANK.AVG function - The function returns the rank of a number in a list of numbers in Excelrank.avg function: the function returns the rank of a number in a list of numbers whose size is in correlation with other values. if multiple values have the same rank -> the function returns the average rank. support functions from execl 2010 version and above