+ Reply to Thread
Results 1 to 5 of 5

Search one list for any substring matches from a second list of words

  1. #1
    Registered User
    Join Date
    01-06-2016
    Location
    Birmingham, England
    MS-Off Ver
    2013
    Posts
    3

    Search one list for any substring matches from a second list of words

    I have a list of data in one column (call it column A) that includes football transfers from 2015 e.g. "Jayden Stockley (AFC;Bournemouth - Portsmouth)". These have players names in them but also their respective team before and after transfer within each cell.

    I have a second list of data (call it column B) of several hundred football players, with no teams, just their names e.g. "Jayden Stockley", "Rob Jones", "Peter Drury".

    I would like to find any transfer that in is column A that includes any of the names from column B (not an exact match because column B will not have the teams or brackets, just the name).

    If I were doing it manually I would highlight column A and hit ctrl + F and type in each players name from column B one by one and then see if they made a transfer, but there must be a way of the search looping through list B without me typing them one by one.

    Ultimately I want a copied list that includes only transfers from column A that is of players in column B so I don't know if its easiest to find matches and then manually copy and paste into a new area of the spreadsheet or if a formula could copy the cell if it is a transfer that is of a player from column B.

    Thanks in advance for help, apologies I couldn't find out how to do this from other posts.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Search one list for any substring matches from a second list of words

    Hi, welcome to thwe forum

    Sounds like you need to do a MATCH with a wild card...
    =MATCH(B1&"*",A:A,0)
    To return the infro frm A...
    =INDEX(A:A,MATCH(B1&"*",A:A,0))

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-06-2016
    Location
    Birmingham, England
    MS-Off Ver
    2013
    Posts
    3

    Re: Search one list for any substring matches from a second list of words

    That is fantastic thank you FDibbins,

    what will happen using these formulas if there are multiple occurrances of a player in list A? The index stuff has worked brilliantly and tells me which column to copy the data from, but it the same player has two or more transfers will I know using this formula?

    Thanks again

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Search one list for any substring matches from a second list of words

    If I understand you correctly, no, INDEX/MATCH only returns the 1st "gfind", after that, it stops looking. There are ways around this, so if you upload some sample data, I can see if I can put something together for you

  5. #5
    Registered User
    Join Date
    01-06-2016
    Location
    Birmingham, England
    MS-Off Ver
    2013
    Posts
    3

    Re: Search one list for any substring matches from a second list of words

    Hi,

    Attached is the first section of the data I am sifting through.

    Thanks,
    thprest02
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 05-21-2015, 03:09 AM
  2. Trying to find a substring in a list of words
    By Finley_77 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2014, 01:23 PM
  3. Replies: 3
    Last Post: 08-14-2013, 10:38 AM
  4. [SOLVED] Macro to Search in list for matches
    By mrr2 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-13-2013, 05:06 PM
  5. Skakes in the Summer
    By lowryda777 in forum Excel General
    Replies: 2
    Last Post: 06-27-2012, 10:29 AM
  6. Replies: 1
    Last Post: 04-04-2012, 07:15 PM
  7. Search Col.A for words that contain charactrs in Col.B & list all matches adjacently
    By macemegane in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2010, 11:17 AM

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