Vivek Verma
  • Home
  • Portfolio
  • Resume
  • Blog
  • Technical Reference
  • Contact Me

YEARFRAC

YEARFRAC

Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the end_date). Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations to assign to a specific term.

If this function is not available, run the Setup program to install the Analysis ToolPak. After you install the Analysis ToolPak, you must enable it by using the Add-Ins command on the Tools menu.

Syntax

YEARFRAC(start_date,end_date,basis)

Start_date   is a date that represents the start date.

End_date   is a date that represents the end date.

Basis   is the type of day count basis to use.

Basis

Day count basis

0 or omitted

US (NASD) 30/360

1

Actual/actual

2

Actual/360

3

Actual/365

4

European 30/360


Remarks

  • All arguments are truncated to integers.
  • If any argument is nonnumeric, YEARFRAC returns the #VALUE! error value.
  • If start_date or end_date are not valid dates, YEARFRAC returns the #NUM! error value.
  • If basis < 0 or if basis > 4, YEARFRAC returns the #NUM! error value.

Examples

YEARFRAC("01/01/93", "06/30/93",0) equals 0.5

YEARFRAC("01/01/93", "07/01/93",3) equals 0.49863

I Would Love to Have You Visit Soon!

  • Home
  • Portfolio
  • Resume
  • Blog
  • Technical Reference
  • Contact Me