Microsoft KB Archive/89026

{|
 * width="100%"|

Excel: Documentation Error in YEARFRAC Function

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, version 4.0
 * Microsoft Excel for the Macintosh, version 4.0

-

SUMMARY
In the &quot;Microsoft Excel Function Reference,&quot; version 4.0, page 469, the example of the YEARFRAC function is incorrect. The last comment in the Remarks section of the YEARFRAC function is also incorrect.

MORE INFORMATION
The example that reads:

YEARFRAC(DATEVALUE(&quot;01/01/91&quot;),

DATEVALUE(&quot;07/01/91&quot;),3) equals 0.49589

Should read:

YEARFRAC(DATEVALUE(&quot;01/01/91&quot;),

DATEVALUE(&quot;06/30/91&quot;),3) equals 0.49589

The last comment in the REMARKS section reads:

  * If start_date >= end_date, YEARFRAC returns the #NUM! error value.

This is incorrect. If the starting date and ending date are both valid serial dates, the YEARFRAC function does not return #NUM! if the start_date is greater than or equal to the end_date.

Note that this second problem has been corrected in the Microsoft Excel version 5.0 Help file.