Does cell contain a value?

  • Thread starter Thread starter wynn
  • Start date Start date
W

wynn

I want to check if a cell contains a value, i.e.
return "yes" if A2 contains "Bob"

A2 = "Bob goes to the store"
 
I want to check if a cell contains a value, i.e.
return "yes" if A2 contains "Bob"

A2 = "Bob goes to the store"

One way,

=IF(COUNTIF(A2,"*Bob*"),"yes","no")
 
wynn said:
I want to check if a cell contains a value, i.e.
return "yes" if A2 contains "Bob"

A2 = "Bob goes to the store"

Try,

case sensitive
=IF(ISNUMBER(FIND("Bob",A2)),"Yes","")

not case sensitive
=IF(ISNUMBER(SEARCH("Bob",A2)),"Yes","")

Hope this helps!
 
Now Harlan, ..............THAT is cool...........it's going in my personal
goodie box.........thanks

Vaya con Dios,
Chuck, CABGx3
 
Back
Top