How do I perform a contains function for a specific cell?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am wanting to do an if statement. If cell A contains "a certain word" then
Y else N. what is the syntax for the the contains portain of the if
statement?
 
Vstein said:
I am wanting to do an if statement. If cell A contains "a certain word" then
Y else N. what is the syntax for the the contains portain of the if
statement?

Some example idioms...

=ISNUMBER(SEARCH(" "&E2&" "," "&A2&" "))+0

=ISNUMBER(FIND(" "&E2&" "," "&A2&" "))+0

=COUNTIF(A2,"*"&E2&"*")

Custom format the formula cell as:

[=0]"N";[=1]"Y"
 
Hi,

Try these:

case sensitive
=IF(ISERROR(FIND("YourString",A1)),"No","Yes")
=IF(SUBSTITUTE(A1,"YourString","")=A1,"No","Yes")

not case sensitive:
=IF(COUNTIF(A1,"*YourString*"),"Yes","No")
=IF(ISERROR(SEARCH("YourString",A1)),"No","Yes")

Regards,
KL
 

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