View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default AND Headache (with dates)!

Alan,

A1 has a date, which is a serial number, 38,016 in this case. The values in
quotes are strings, and although it would be possible to work out the actual
values compared, I won't bother, but the results do not surprise.

Try this in B1 =A1<DATE(2004,2,1), and this in C1 =A1DATE(2003,12,31, and
you will see they both resolve to True. Test like for like, and you can
predict the results.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Alan L. Wagoner" wrote in message
...
Greetings All,

I'm going crazy trying to figure out what's wrong.

In A1, I have the following:
01/30/2004

In B1, I have the following formula:
=And(A1< "02/01/2004")
which results in: TRUE (makes sense to me...)

In C1, I have the following formula:
=And(A1 "12/31/2003")
which results in: FALSE (huh?!?!)

In B2, I have the following:
=And(A1< 02/01/2004)
which results in FALSE (huh ?!?!)

In C2, I have the following:
=And(A1< 12/31/2003)
which results in TRUE (makes sense to me).

What is going on?

Thanks in advance!

--Alan