Bug in Excel

S

sdsteve

I'm trying to test dates in Excel to see if they're before the end of 2007,
so I tried
A1<=12/31/2007 and it returns FALSE even when the date in A1 is before
12/31/2007.

So I put the date 12/31/2007 in a separate cell, D1, and the formula =A1<=D1
returns TRUE, as it should.

What gives? Is there something magical about entering the date 12/31/2007
inside the formula compared to in a separate cell?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...-a947cdb8d880&dg=microsoft.public.office.misc
 
C

Carey Frisch [MVP]

The proper newsgroup for issues with Microsoft Excel
is the Excel newsgroup:
http://www.microsoft.com/office/com...?dg=microsoft.public.excel.misc&lang=en&cr=US

--
Carey Frisch
Microsoft MVP
Windows Shell/User

---------------------------------------------------------------

:

I'm trying to test dates in Excel to see if they're before the end of 2007,
so I tried
A1<=12/31/2007 and it returns FALSE even when the date in A1 is before
12/31/2007.

So I put the date 12/31/2007 in a separate cell, D1, and the formula =A1<=D1
returns TRUE, as it should.

What gives? Is there something magical about entering the date 12/31/2007
inside the formula compared to in a separate cell?
 
V

Val

Nope. Try any other date, you'll probably see same results.

Try the formula =(A1 <= DATEVALUE("12/31/2007"))
so that you're actually comparing apples to apples.


I'm trying to test dates in Excel to see if they're before the end of 2007,
so I tried
A1<=12/31/2007 and it returns FALSE even when the date in A1 is before
12/31/2007.

So I put the date 12/31/2007 in a separate cell, D1, and the formula =A1<=D1
returns TRUE, as it should.

What gives? Is there something magical about entering the date 12/31/2007
inside the formula compared to in a separate cell?
 
Top