View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default If And using dates

"Mike H" wrote:
=IF(AND(NOW()=DATE(2009,8,1),NOW()<=DATE(2009,9,1 3)),200,0)


Since the OP used NOW(), I suspect this is what she needs:

=IF(AND(NOW()=DATE(2009,8,1),NOW()<DATE(2009,9,14 )),200,0)

Note the change from "<=" to "<" and from 9/13/2009 to 9/14/2009.

Test by replacing NOW() with a cell reference, and enter 9/13/2009 23:59:59
into the cell to simulate the latest NOW() on 9/13/2009.

IMHO, the OP should use TODAY(), not NOW(). Then the intuitive formula
would work as Mike (and the OP) wrote it.


----- original message -----

"Mike H" wrote in message
...
Hi,

Maybe this

=IF(AND(NOW()=DATE(2009,8,1),NOW()<=DATE(2009,9,1 3)),200,0)

Mike

"Newbie and Lost" wrote:

I am trying to write a formula so the if the current date NOW() is
between
08/01/09 to 09/13/09 then put 200 otherwise put 0. See formula below. It
works when I am referencing a cell with those dates but it won't work if
I
type the dates into the formula. Am I writing the dates incorrectly? In
Access I usually put #01/08/09# but I tried that format and it didn't
work
either.

My formula:
=IF(AND(NOW()=8/3/9,NOW()<=9/13/9),200,0)

Jen