IF Date formula

D

Daniel Q.

I need to a formula that says if a cell (B5) equals a certain month between
11/1 and 3/31 then it's a winter month and therefore give me a price from
cell (W54). If it's a summer month between 4/1 and 10/31 then it gives me the
price from W55.

I have this but it's not working:

=IF(AND(B5>=11/1/2006,B5<=3/31/2007),W54,W55)

Thanks for your help.
 
D

Duke Carey

To make Excel treat your dates as dates, enter them as

DATE(2006,11,1)
and
DATE(2007,3,31)
 
M

Mike Campbell

Assuming you don't want to update this formula each year, try this:
=IF(OR(MONTH(B5)>=11,MONTH(B5)<=3),W54,W55)
 
Top