Excel: DAY() Function Returns 1 When Referencing Blank CellLast reviewed: November 2, 1994 |
1.00 1.03 1.04 1.06 1.50 2.20 3.00 4.00 MACINTOSH SUMMARYIn Microsoft Excel, a value of 1 will be returned to the =DAY(cell_reference) function if "cell_reference" is a blank cell. This value is returned because a blank cell is equal to 0 (zero) and a zero serial date on the Macintosh is January 1, 1904; therefore, =DAY(0) equals 1. MORE INFORMATIONThis situation can result in the first day of the month appearing equal to a blank cell, as shown in the following example: =IF(DAY(A1)<>DAY(NOW()),"Not Equal","Equal") If A1 is blank, DAY(A1) returns 1. If NOW() is the first day of the month, DAY(NOW()) returns 1. "Equal" is returned, even though cell A1 is blank. To see if A1 is blank, use the following formula: =IF(A1="","Not Equal",IF(DAY(A1)<>DAY(NOW()),"Not Equal","Equal")) |
KBCategory: kbother |
Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.