+ Reply to Thread
Results 1 to 3 of 3

Finding 2 matching words in another set of "sentances" data

  1. #1
    Registered User
    Join Date
    06-19-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    9

    Finding 2 matching words in another set of "sentances" data

    Greetings,

    First of all, thank you for taking time to look and post and offer help; I greatly appreciate it. I have searched extensively for the answer to my problem with no success as of yet.

    Problem:

    I have a list of 2-word phrases (List 1) and a list of "sentance" phrases (List 2) ranging from 1 word to ~12 words. My goal is to check List 2 for a 2-word match (any word order) in List 1 and insert that matching 2-word phrase in the column next to List 2.

    Here are examples of the 2 lists:

    List 1: 2-Word Phrases


    eg.

    red shoes
    green sneakers
    blue heels


    List 2: "Sentance" Phrases

    eg.

    light green sneakers
    ugly shoes that are red
    green hightop sneakers
    blue cocktail heels
    new red shoes
    heels to wear with blue dress


    Goal output:

    (Existing List 1 column, let's call it "Column A")

    light green sneakers
    ugly shoes that are red
    green hightop sneakers
    blue cocktail heels
    new red shoes
    heels to wear with blue dress

    (Result "matches" column, let's call it "Column B")

    green sneakers
    red shoes
    green sneakers
    blue heels
    red shoes
    blue heels


    Any help that someone can provide is immensely helpful. I've been trying to solve this problem for a week, and can't find a solution. Feel free to ask me any questions if this is not clear in any way.

    Thanks in advance,
    Jason

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Finding 2 matching words in another set of "sentances" data

    Hi Jason and welcome to the forum,

    I believe you are going to need some VBA code to accomplish your task.

    Find the attached with an example and the VBA that will do it for you.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    06-19-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Finding 2 matching words in another set of "sentances" data

    Wow, thanks Marvin, that macro worked perfectly!

    Thanks for the help, I really appreciate it.

    Best,
    Jason

+ 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.6.0 RC 1