Does cell contain a value?

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"
 
H

Harlan Grove

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")
 
D

Domenic

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!
 
C

CLR

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

Vaya con Dios,
Chuck, CABGx3
 

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

Top