If then syntax

R

RL

I want to use the If then function to have it look at a cell and if the date
in the cell is between the beginning and end of the current Fiscal year,
enter a 1 in my cell. My logic was, IF (test cell) >=Date(2004,10,1) and
<=Date(2005,9,30),1,0). I seem to do just fine with the first half, but as
soon as I add the "and" I end up getting an invalid. Can someone tell me
the proper syntax for meeting two conditions?

Thanks
 
J

Jason Morin

=IF(AND(A1>=DATE(2004,10,1),A1<=DATE(2005,9,30)),1,0)

Or

=(A1>=DATE(2004,10,1))*(A1<=DATE(2005,9,30))

HTH
Jason
Atlanta, GA
 
J

Joseph

Try using this formula

=IF(A2>=DATE(2005,1,1),IF(A2<=DATE(2005,4,1),1,0))

Where A2 has the Date that you want. Let me know how it goes.

Cheer
 
Top