close

I'm trying to use an quot;IFquot; function to look for a certain word in a string of
text. Is there a quot;containsquot; operator for this?

I tried using =if(A1=quot;*example*quot;,quot;yesquot;,quot;noquot;) but this does not seem to work.

You can use the FIND function and test for a (non-) error result (ISERROR)

--
Kind regards,

Niek Otten

quot;Pawasoquot; gt; wrote in message
...
gt; I'm trying to use an quot;IFquot; function to look for a certain word in a string
gt; of
gt; text. Is there a quot;containsquot; operator for this?
gt;
gt; I tried using =if(A1=quot;*example*quot;,quot;yesquot;,quot;noquot;) but this does not seem to
gt; work.
Try this:

=IF(ISERROR(FIND(quot;examplequot;,A1,1)),quot;noquot;,quot;yesquot;)

HTH,
Elkar

quot;Pawasoquot; wrote:

gt; I'm trying to use an quot;IFquot; function to look for a certain word in a string of
gt; text. Is there a quot;containsquot; operator for this?
gt;
gt; I tried using =if(A1=quot;*example*quot;,quot;yesquot;,quot;noquot;) but this does not seem to work.

=find() is case sensitive
=search() doesn't care about case (Example/EXAMPLE/ExAmPlE will be treated the
same)

another way:

=if(countif(a1,quot;*example*quot;)gt;0,quot;yepquot;,quot;nopequot;)

(not case sensitive)

Pawaso wrote:
gt;
gt; I'm trying to use an quot;IFquot; function to look for a certain word in a string of
gt; text. Is there a quot;containsquot; operator for this?
gt;
gt; I tried using =if(A1=quot;*example*quot;,quot;yesquot;,quot;noquot;) but this does not seem to work.

--

Dave Peterson

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()