+ Reply to Thread
Results 1 to 4 of 4

Find a keyword/phase from a table in an other table with an all or a partial match

  1. #1
    Registered User
    Join Date
    06-26-2014
    Location
    Queensland, Australia
    MS-Off Ver
    2016
    Posts
    35

    Find a keyword/phase from a table in an other table with an all or a partial match

    Hi

    I have two unrelated tables.

    Table A:

    ID Sentence
    1 The bird, cat and dog are Jason's friendly pets.
    2 My dog really likes to go to the dog park.
    3 I have a very large, colourful and noisy bird.

    Table B:

    Keywords
    bird
    cat
    dog
    dog park
    sheep
    pets
    park

    If it's possible, I need help with a query or VBA that will ultimately give me the result below:

    ID Sentence Match1 Match2 Match3 Match4
    1 The bird, cat and dog are Jason's friendly pets. bird cat dog pets
    2 My dog really likes to go to the dog park. dog dog park
    3 My bird is a very large, colourful and noisy bird. bird bird

    If there's no keyword matches in the sentence, the ID and sentence would still appear but all Match columns would be blank.

    EDIT: The same word can appear more than once as in ID 3.

    Would anyone know how I can achieve this? TIA
    Last edited by darls15; 08-26-2019 at 07:15 AM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Find a keyword/phase from a table in an other table with an all or a partial match

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    F
    G
    H
    1
    ID
    Sentence Match 1 Match 2 Match 3 Match 4 Keywords
    2
    1
    The bird, cat and dog are Jason's friendly pets. bird cat dog pets bird
    3
    2
    My dog really likes to go to the dog park. dog dog park park cat
    4
    3
    I have a very large, colourful and noisy bird. bird dog
    5
    dog park
    6
    sheep
    7
    pets
    8
    park


    B
    C
    2
    The bird, cat and dog are Jason's friendly pets. =IFERROR(INDEX($H:$H,SMALL(IF(ISNUMBER(SEARCH($H$2:$H$8,$B2)),ROW($H$2:$H$8),10^9),COLUMN()-2)),"")
    Sheet: Sheet1

    Formula in C2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    is array formula so you have to accept it with Ctrl+Shift+Enter (not just Enter), then drag it right and down.

    EDIT: sorry I did not spot that question is about Access not excel.
    Last edited by KOKOSEK; 08-26-2019 at 07:13 AM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    06-26-2014
    Location
    Queensland, Australia
    MS-Off Ver
    2016
    Posts
    35

    Re: Find a keyword/phase from a table in an other table with an all or a partial match

    Hi KOKOSEK, thanks for your quick reply, however I was wanting a MSAccess solution and not MSExcel. Have I put this in the wrong forum?

    EDIT: Sorry just saw your edit
    Last edited by darls15; 08-26-2019 at 07:14 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: Find a keyword/phase from a table in an other table with an all or a partial match

    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] index match for table and partial cell contents
    By surk in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-12-2016, 01:53 PM
  2. Find Keyword in URL from Lookup Table
    By newbieexceldude in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-09-2016, 12:11 PM
  3. A Macro to Find Keyword in URL from Lookup Table
    By newbieexceldude in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-09-2016, 02:14 AM
  4. How to Lookup with a table with a partial text from another table
    By kuyage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-04-2016, 09:13 AM
  5. [SOLVED] Vlookup to Pivot Table, using Match function, returns error if can't find match value
    By AndrewHowarth in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2015, 12:10 AM
  6. Table Array with Wildcard involving partial URL match
    By tworoads in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2014, 09:29 AM
  7. [SOLVED] macro help to match what a user input to a partial phase in a cell
    By xacx3x in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2014, 01:30 PM

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