Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Date comparisons within AND() functions

I'm trying to compare dates within an =AND() function but having trouble.
I can get =IF() to work but not =AND().
E.g. Cell A1 = 6/15/2009
I can do =if(A1<6/30/2009,GOOD,BAD)
WOrks fine.
When I do =IF(AND(A1<6/30/2009,TRUE),GOOD,BAD)
it doesn't give the right answer. Is there something about formatting dates
within AND() that makes it fail, when it works within an IF function?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Date comparisons within AND() functions

=IF(A1<"6/30/2009","GOOD","BAD")
=IF(AND(A1<"6/30/2009",TRUE),"GOOD","BAD")
both worked for me.

HTH,
Bernie
MS Excel MVP

"Sambonator" wrote in message
...
I'm trying to compare dates within an =AND() function but having trouble.
I can get =IF() to work but not =AND().
E.g. Cell A1 = 6/15/2009
I can do =if(A1<6/30/2009,GOOD,BAD)
WOrks fine.
When I do =IF(AND(A1<6/30/2009,TRUE),GOOD,BAD)
it doesn't give the right answer. Is there something about formatting
dates
within AND() that makes it fail, when it works within an IF function?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Yr to Yr comparisons cisse_5 Excel Discussion (Misc queries) 7 May 15th 09 06:10 PM
lookup functions and text comparisons GK Excel Worksheet Functions 1 January 20th 09 11:39 PM
Formula For Date Comparisons foofoo Excel Discussion (Misc queries) 2 October 9th 07 05:50 PM
Spreadsheet Comparisons dah Excel Discussion (Misc queries) 4 August 4th 06 12:28 AM
Can I add more than 2 comparisons to an IF statement?? joshua Excel Discussion (Misc queries) 3 July 27th 06 06:58 AM


All times are GMT +1. The time now is 02:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"