function Help

A

Anthony B

Hi,
I am tryign to write a function that will enable someone to look in a range,
and see if any of the cells in that range contain a certain value, and if so
return true.
For example in column a i have

a,b,c in A1
d,e,f in A2
g,h,i in A3

In cell B1 i have the letter e

I have to be able to have a function in C1, that looks at B1, searches
A1,A2,A3 for the result finds it in A2 and returns true as the value. It is
possible that e exists in more than one cell

Can anyone help, this seems simple but is driving me nuts, i dont want to do
it using a macro.
 
T

Tom Ogilvy

=if(countif(A1:A3,"*"&B1&"*")>0,True,False)

or just

=countif(A1:A3,"*"&B1&"*")>0
 
Top