+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Search for multiple text within a cell

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Search for multiple text within a cell

    Hi..

    how do i search a cell to see if it contains any one of several words?

    For a single word I'm using:

    =IF(ISNUMBER(SEARCH("LB",a1)),"Buy","")

    But if within cell "a1" I want to check if it contains either "LV" or "GUC" or "DG"? (where a1 is a string of text e.g., "AMLVDM") what do I use?

    Thanks very much.
    Last edited by northerng; 01-27-2011 at 11:43 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Search for multiple text within a cell

    Try =IF(SUMPRODUCT(--(D1:D4<>""),--ISNUMBER(SEARCH(D1:D4,A1))),"Buy","")

    where D1:D4 contain the search criteria
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-27-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Search for multiple text within a cell

    works great..thank you NBVC!

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,609

    Re: Search for multiple text within a cell

    Not sure what you are doing but you can play with:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    01-27-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Search for multiple text within a cell

    thanks protonleah...

+ 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