IF(AND function is not working

  • Thread starter Access Newbie looking for help
  • Start date
A

Access Newbie looking for help

Why won't my IFAND function work. below are the columns in my worksheet and
example of the data that is in each column. However, my formula is returning
a " " or blank cell instead of the number 1 for dates that are greater than
12/1/2004 and less than 1/1/2006

Function Costcenter
unit date

A B
C D
IF(AND(D2>12/1/2004,D2<1/1/2006),1,"") 1200120 3465
8/1/2005
 
B

Beege

Looks like 12/1/2004 and 1/1/2006 are division problems to Excel
Try:
=IF(AND(D2>DATE(2004,1,12),D2<DATE(2006,1,1)),1,"")
Beege


"Access Newbie looking for help"
 
Top