+ Reply to Thread
Results 1 to 6 of 6

ISTEXT or SEARCH function with 2 variables

  1. #1
    Registered User
    Join Date
    07-08-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    7

    ISTEXT or SEARCH function with 2 variables

    Hi all,

    Assuming that I have some words in column A and I specifically want to retrieve those rows with the word "Apple" or "Orange" which do not exist in the same row:

    Item (column A) Extracted column (column B)
    Apple is a good fruit Apple is a good fruit
    mango
    banana
    HOT turkey
    I love oranges I love oranges
    Red Apples Red Apples
    Red Oranges Red Oranges


    What is the formula that I should use in order to get the answers in column B ?

    Appreciate all your kind reply!!

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: ISTEXT or SEARCH function with 2 variables

    One way might be

    Please Login or Register  to view this content.
    Hope this helps
    Last edited by Marcol; 07-08-2010 at 04:35 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: ISTEXT or SEARCH function with 2 variables

    Hi,

    =IF(OR(ISNUMBER(SEARCH("Apple",A1)),ISNUMBER(SEARCH("orange",A1))),A1,"")

    replace search with find to make the formula case dependant.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Registered User
    Join Date
    07-08-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: ISTEXT or SEARCH function with 2 variables

    Quote Originally Posted by Marcol View Post
    One way might be

    Please Login or Register  to view this content.
    Hope this helps
    Thanks for the lightning quick solution!

    Quick question, can I use the 'SEARCH' function instead since I thought it is not case sensitive?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: ISTEXT or SEARCH function with 2 variables

    Another variation

    =IF(COUNT(SEARCH({"Apple","Orange"},A1)),A1,"")

    Adjust the inline array for more / less terms of interest

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: ISTEXT or SEARCH function with 2 variables

    mobycane

    Go with sweeps solution, it's much better than mine!

    [EDIT]
    So is DonkeyOtes, didn't see it before posting reply.

    That's the problem with me, "lightning quick solution", and not really thinking!
    Last edited by Marcol; 07-08-2010 at 04:56 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1