+ Reply to Thread
Results 1 to 5 of 5

Check if Cell Contains any values from a list, partial match

  1. #1
    Registered User
    Join Date
    07-20-2013
    Location
    Sechelt, BC, Canada
    MS-Off Ver
    Excel 2011 (Mac) and 2007/2010/2013 (Win 7)
    Posts
    6

    Check if Cell Contains any values from a list, partial match

    Hi!

    I'm trying to find if a cell contains a partial text match to a list of text values in a range of cells.

    For example,

    Let's say cell a1 contains a really long text-value:

    A1
    ="If horse-racing is the sport of kings then surely bowling is a… very good sport as well"

    And cells b1:b3 are
    ="bowling"
    ="lacrosse"
    ="badminton"

    if I want to check to see if any of the words in b1:b3 are contained in a1, is there a way to do that? It's sort of like a mini-database lookup.

    I've searched for a long while, and, over the years this site has been invaluable to me, but I haven't been able to find any solutions for this one as of yet.

    Thanks!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Check if Cell Contains any values from a list, partial match

    Perhaps in C1 something like =if(isnumber(search("*"&B1&"*",$A$1)),"contained","not contained") and pull down as needed

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Check if Cell Contains any values from a list, partial match

    Try

    =IFERROR(LOOKUP(2^15,SEARCH(B1:B3,A1),B1:B3),"")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    07-20-2013
    Location
    Sechelt, BC, Canada
    MS-Off Ver
    Excel 2011 (Mac) and 2007/2010/2013 (Win 7)
    Posts
    6

    Re: Check if Cell Contains any values from a list, partial match

    Thank you so much to both Pepe Le Mokko and Fotis1991! Ultimately, I find Fotis1991's solution to be the most robust for my purposes here. This is very powerful, and using this function, along with a bunch of others I've been piecing together, coupled with a couple hundred hours of my labour, Excel will be able to solve serious problems and feature requests that our database software company hasn't been able to solve in over ten years, as well as likely hundreds of hours per labour annually, and have lots of fun too!

    Thanks again to both of you!

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Check if Cell Contains any values from a list, partial match

    ........................

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to check if entire column has an partial match from a cell?
    By goljat in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-07-2013, 04:16 PM
  2. [SOLVED] Finding a partial match within a list on another tab
    By IN_FOR_SIN in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-21-2013, 10:33 AM
  3. Partial Match List
    By bror in forum Excel General
    Replies: 4
    Last Post: 03-23-2012, 08:14 PM
  4. Partial Match List
    By asherthedevil in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2008, 11:46 PM
  5. Replies: 2
    Last Post: 10-30-2007, 12:12 PM

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