#1   Report Post  
Posted to microsoft.public.excel.misc
CF
 
Posts: n/a
Default 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"
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Natalie
 
Posts: n/a
Default 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"

  #4   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR
 
Posts: n/a
Default 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"


  #5   Report Post  
Posted to microsoft.public.excel.misc
CF
 
Posts: n/a
Default 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"





  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"