IF question

  • Thread starter Thread starter Alyssa
  • Start date Start date
A

Alyssa

I am attempting an IF lookup for a list of cells that have letters in them. I
know how to say IF the cell equals (=) a certain letter, but is there a way
to say IF the cell contains a certain letter?
 
=if(isnumber(search("a",a1)),"A1 contains an a","nope")

If you want to match case, then use =Find() instead of =search()

And another way if you don't care about upper/lower case:
=if(countif(a1,"*a*")>0,"yep","nope")
 
You'll want to use either FIND (case-sensitive) or SEARCH(non-case-sensitive)

For instance, if A1 = "This is a test"
and A2 = "is"
=IF(ISNUMBER(SEARCH(A2,A1)),"Text found","Not found"
 
Back
Top