View Single Post
  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default How to add date format into if statement?

One way:

=IF(A1=DATE(2005,3,1),1,0)

or, more efficiently

=--(A1=DATE(2005,3,1)

since XL treats boolean operators (TRUE/FALSE) as 1/0 in math operations
(negation, then negation again).

In article ,
"Eric" wrote:

Does anyone know how to add date format into if statement? such as
If(A1="1-Mar-2005", 1,0)
Thank you
Eric