Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 19th 06, 05:59 PM posted to microsoft.public.excel.worksheet.functions
Pawaso
 
Posts: n/a
Default Text "comparison" operator for "contains" used in an "IF" Function

I'm trying to use an "IF" function to look for a certain word in a string of
text. Is there a "contains" operator for this?

I tried using =if(A1="*example*","yes","no") but this does not seem to work.

  #2   Report Post  
Old January 19th 06, 06:15 PM posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default Text "comparison" operator for "contains" used in an "IF" Function

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

--
Kind regards,

Niek Otten

"Pawaso" wrote in message
...
I'm trying to use an "IF" function to look for a certain word in a string
of
text. Is there a "contains" operator for this?

I tried using =if(A1="*example*","yes","no") but this does not seem to
work.



  #3   Report Post  
Old January 19th 06, 06:22 PM posted to microsoft.public.excel.worksheet.functions
Elkar
 
Posts: n/a
Default Text "comparison" operator for "contains" used in an "IF" Function

Try this:

=IF(ISERROR(FIND("example",A1,1)),"no","yes")

HTH,
Elkar

"Pawaso" wrote:

I'm trying to use an "IF" function to look for a certain word in a string of
text. Is there a "contains" operator for this?

I tried using =if(A1="*example*","yes","no") but this does not seem to work.

  #4   Report Post  
Old January 19th 06, 07:42 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Text "comparison" operator for "contains" used in an "IF" Function

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

another way:

=if(countif(a1,"*example*")0,"yep","nope")

(not case sensitive)

Pawaso wrote:

I'm trying to use an "IF" function to look for a certain word in a string of
text. Is there a "contains" operator for this?

I tried using =if(A1="*example*","yes","no") but this does not seem to work.


--

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif function for instances of text string contained David Billigmeier Excel Worksheet Functions 2 October 10th 05 09:51 PM
convert numbers to text bellman Excel Discussion (Misc queries) 0 October 4th 05 10:28 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
how do you use the text function? bird_62 Excel Worksheet Functions 1 June 20th 05 04:01 AM
How do I add help text to an excel function I have created Peter 99 Excel Worksheet Functions 2 January 14th 05 07:04 PM


All times are GMT +1. The time now is 02:25 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017