WorksheetFunction.YearFrac (Excel)

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.

YearFrac (Arg1, Arg2, Arg3)


Dim dblYearFrac As Double
dblYearFrac = WorksheetFunction.YearFrac(Arg1:=, Arg2:=)

Arguments

Arg1, Arg2, Arg3

Arg1 - Start_date - a date that represents the start date

Arg2 - End_date - a date that represents the end date

Arg3 - Basis - the type of day count basis to use