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

V

Vstein

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?
 
A

Aladin Akyurek

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

KL

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
 
Top