ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If contains (https://www.excelbanter.com/excel-discussion-misc-queries/86554-if-contains.html)

CF

If contains
 
Is it possible to write an IF function with the operator "contains"

IF cell X contains "hello" then "YES" otherwise "no"

Cell X = "Yo hello yo" - function returns "YES"

Pete_UK

If contains
 
There isn't a "contains" function or operator, but you can test for the
occurrence of one string in another by means of SEARCH( ) or FIND( ) -
FIND is case-sensitive.

Hope this helps.

Pete


RagDyeR

If contains
 
Try this:

=IF(ISNUMBER(SEARCH("hello",A1)),"Yes","No")

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"CF" wrote in message
...
Is it possible to write an IF function with the operator "contains"

IF cell X contains "hello" then "YES" otherwise "no"

Cell X = "Yo hello yo" - function returns "YES"



Natalie

If contains
 
If you use the logical IF function wizard you will be able to enter your cell
range and criteria with a returns Yes if true and No if not true..
--
Natalie


"CF" wrote:

Is it possible to write an IF function with the operator "contains"

IF cell X contains "hello" then "YES" otherwise "no"

Cell X = "Yo hello yo" - function returns "YES"


CF

If contains
 
Works!

thank you.

"RagDyeR" skrev:

Try this:

=IF(ISNUMBER(SEARCH("hello",A1)),"Yes","No")

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"CF" wrote in message
...
Is it possible to write an IF function with the operator "contains"

IF cell X contains "hello" then "YES" otherwise "no"

Cell X = "Yo hello yo" - function returns "YES"




Dave Peterson

If contains
 
One mo

=if(countif(a1,"*hello*")0,"Yes","No")

CF wrote:

Is it possible to write an IF function with the operator "contains"

IF cell X contains "hello" then "YES" otherwise "no"

Cell X = "Yo hello yo" - function returns "YES"


--

Dave Peterson


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com