function Help

  • Thread starter Thread starter Anthony B
  • Start date Start date
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.
 
=if(countif(A1:A3,"*"&B1&"*")>0,True,False)

or just

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top