IF value is in range

K

Kirsty

I am trying to write a formula or macro that returns a result if a value is
in a range.
I can write the lookup fine, but i am getting data errors if there is no
value.

What i want to do is put an IF statement in that states
IF(date,is in range,then,0)

Can anyone help
 
F

Fred Smith

Something like this:

=if(and(a1>date(2009,1,1),a1<date(2009,2,1)),"in range","out of range")

?

Regards,
Fred.
 
T

T. Valko

Hmmm....
returns a result if a value is in a range.

Returns what result?

Try something like this:

=IF(COUNTIF(A1:A10,X1),"Yes, it's there","No, it's not there")
 
Top