Microsoft KB Archive/110464

= Microsoft Knowledge Base =

XL5: Examples of YEARFRAC Function Incorrect in Help
Last reviewed: March 27, 1997

Article ID: Q110464

5.00 5.00c 7.00| 5.00

WINDOWS       | MACINTOSH DocErr kbdocerr

The information in this article applies to:


 * Microsoft Excel for Windows, versions 5.0, 5.0c
 * Microsoft Excel for Windows 95, version 7.0
 * Microsoft Excel for the Macintosh, version 5.0

SUMMARY
In Microsoft Excel Help, the examples for the YEARFRAC function are incorrect.

The current examples read:

YEARFRAC(DATEVALUE("01/01/93"),DATEVALUE("06/30/93"),0) equals 0.5 YEARFRAC(DATEVALUE("01/01/93"),DATEVALUE("07/01/93"),3) equals 0.49863

The correct examples should read:

YEARFRAC(DATEVALUE("01/01/93"),DATEVALUE("06/30/93"),0) equals 0.497222 YEARFRAC(DATEVALUE("01/01/93"),DATEVALUE("07/01/93"),3) equals 0.49589

MORE INFORMATION
Although the behavior of the YEARFRAC function in Microsoft Excel versions 5.0 and 7.0 is slightly different from its behavior in Microsoft Excel version 4.0, the examples in Microsoft Excel versions 5.0 and 7.0 Help still show the Microsoft Excel version 4.0 behavior.

The YEARFRAC function uses the start date and end date arguments to calculate the fraction of a year.

The way these dates are used has changed in Microsoft Excel versions 5.0 and 7.0. For example, with a start date of 1/1/93 and end date of 1/1/94, Microsoft Excel versions 5.0 and 7.0 consider it 1 year whereas Microsoft Excel version 4.0 considers it 1 year and 1 day (1.00274 years).

To locate the error:


 * 1) In Microsoft Excel version 5.0, choose Search for Help On from the Help menu.
 * 2) Enter "Yearfrac" (without the quotation marks).
 * 3) Select Show Topics, then choose Go To.
 * 4) Scroll through the Help window until you locate the Examples section.