Microsoft KB Archive/94605

= Microsoft Knowledge Base =

Excel: WORKDAY Function Returns #NUM! If Days Equal Zero
Last reviewed: September 12, 1996

Article ID: Q94605

The information in this article applies to:


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

SYMPTOMS
In version 4.0 of Microsoft Excel, the WORKDAY function is used to return the serial number date representing the number of working days before or after the start_date argument. The WORKDAY will return a #NUM! error if the value for the Days argument is 0 (zero).

STATUS
This problem does not occur in later versions of Microsoft Excel.

WORKAROUND
To work around this problem, use an IF function in a formula similar to the following

=IF(A1=0,B1,WORKDAY(B1,A1)) where the Days argument is in cell A1 and the Start Date is in cell B1. The above function verifies whether or not the value in the Days argument is 0 (zero). If this value is 0 (zero), it shows correct date.