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
- Jun 04 Wed 2008 20:44
Text quot;comparisonquot; operator for quot;containsquot; used in an quot;IFquot; Function
close
全站熱搜
留言列表
發表留言
留言列表

