Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
DUH! Thanks for pointing out the <somewhat obvious. --Alan ...missing London "Bob Phillips" wrote in message ... 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) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I'm a leaner wiht a headache!! | Excel Worksheet Functions | |||
Frequency Headache | Excel Worksheet Functions | |||
headache! :) unique_id's | Excel Worksheet Functions | |||
Vlookup Headache | Excel Worksheet Functions | |||
Look up Headache | Excel Programming |