Excel: DAY() Function Returns 1 When Referencing Blank CellLast reviewed: October 31, 1994Article ID: Q51303 |
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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |