LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RS RS is offline
external usenet poster
 
Posts: 113
Default IF month and day match, then...

Quick update: How would I modify the formula to include other dates? I
tried the following but get an #VALUE! error:
=IF(TEXT(C8,"MMDD")=OR("1031","0115","0417"),"text ","")

"Ron Coderre" wrote:

Try something like this:
=IF(TEXT(C8,"MMDD")="1026","text","no match")

The reason this doesn't work: =IF(C8=AND(MONTH(10),DAY(26)),"text")
is that the AND() function regards any positive value as TRUE.
Since MONTH(10) is greater than 0 and DAY(26) is greater than 0,
then AND(MONTH(10),DAY(26)) returns TRUE


Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"RS" wrote:

Hi everyone. Simple question...how would I correct my formula such that if
the date in C8 is a certain date (regardless of the year!), then... The
formula I tried is: =IF(C8=AND(MONTH(10),DAY(26)),"text") where
C8=TODAY(). When I click on the AND in the wizard it says both statements
are TRUE but if I click before the AND, it says FALSE.

Alternatively, I also tried: =IF(TODAY()=AND(MONTH(10),DAY(26)),"text").
However in the wizard, the result is "Volatile" and the cell displays FALSE.

 
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



All times are GMT +1. The time now is 09:05 AM.

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

About Us

"It's about Microsoft Excel"