A formula to look for a value in a blok (eg E1:J10) data

D

Dolflaas

I am looking for a formula in Excel 2003 /2007 that wil search through a blok
of data (say C1: J10) for a value (could by alfa-nomeric) entered into a cel
(say A5) Thus look in C1 : J10 for the value entered in A5 and return true if
found or false if not. Alternatively perform "X" if true else "Y"
Thank You
 
D

Dave Thomas

I'm don't know what you mean by "perform". Here are some examples:

=IF(COUNTIF(C1:J10,A5)>0,TRUE,FALSE) If A5 is in the values in the range
C1:J10, TRUE is returned, else FALSE.
=IF(COUNTIF(C1:J10,A5)>0,"Yes, the value is in the range","No, the value is
not in the range") This is self explanatory.
=IF(COUNTIF(C1:J10,A5)>0,A5,0) This returns the value in A5 if A5 is in
the range C1:J10 else it returns 0.
 
Top