+ Reply to Thread
Results 1 to 3 of 3

Thread: Finding substring in array of possible strings

  1. #1
    Registered User
    Join Date
    12-28-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Finding substring in array of possible strings

    Hello,

    I need a formula to search for a substring in an array of possible strings, then output the matching string.

    Example:

    Col A contains the substrings I'm looking for:

    BLACK
    BLUE
    GREEN
    ORANGE
    PURPLE
    RED
    WHITE
    YELLOW

    Col B will output the matching string it finds

    Col C has the array of possible string matches, for example:

    Conduct IMT - (RED)
    Conduct IMT - Group 101A (BLUE, YELLOW, PURPLE)
    GREEN - Conduct IMT - Group 14
    Attend Meeting - Group 16 - WHITE, BLACK, ORANGE

    So, I want the formula in Col B to tell me for the first one in Col A (Black), it will output the string "Attend Meeting - Group 16 - WHITE, BLACK, ORANGE"

    Thanks very much!
    Last edited by kkerr; 01-06-2011 at 02:01 PM.

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

    Re: Finding substring in array of possible strings

    Assuming data starts in Row2, then in B2:

    =INDEX($C$2:$C$5,MATCH("*"&A2&"*",$C$2:$C$5,0))

    copied down.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    12-28-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Thumbs up Re: Finding substring in array of possible strings

    This worked beautifully! Many thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0