If Statments: Want TRUE if a value = any of the given values

A

Augabog

How do I make an if statment that says: If Value A2 is equal to any of
the Values in Row 4 (F4:IV4), then it is true, otherwise false.

I was putting: =IF(A2=Sheet1!F4:IV4,"1","0"), but it doesn't seem to
recognize the simple F4:IV4 as "any of these values is true".

Thanks,
Kerry
 
R

Ron Coderre

Try one of these:

If there might only be one match
=COUNTIF($F$4:$IV$4,A2)

or....if $F$4:$IV$4 may contain duplicate values
=--(COUNTIF($F$4:$IV$4,A2)>0)

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
A

Augabog

You may try something like:
=IF(COUNTIF(Sheet1!F4:IV4,">0")>0,TRUE,FALSE)

HTH,
Paul



Thanks, this worked. I just had to replace the nested ">0" with the
value I want to match up.
 
Top