+ Reply to Thread
Results 1 to 14 of 14

Return all results of partial match

  1. #1
    Forum Contributor
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    106

    Return all results of partial match

    Hi All,

    I have a need to return all partial matches from strings held in a single column. The returned results will be listed in seperate columns. I have attached a sample sheet with expected results.

    Any help will be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,401

    Re: Return all results of partial match

    Remove ALL expected resuts from C5 to E10, then in C5 followed by ENTER:

    =IFNA(DROP(REDUCE("",B5:B10,LAMBDA(x,y,VSTACK(x,TOROW(FILTER(H5:H11,ISNUMBER(SEARCH(G5:G11,y))))))),1),"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,645

    Re: Return all results of partial match

    This should work for all version of Excel (from 2010+)

    C5:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Quang PT

  4. #4
    Forum Contributor
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    106

    Re: Return all results of partial match

    Whilst both answers work perfectly, so thank you both very much, I failed to note that I have instances of similar partial matches that will conflict. E.g. RF vs RFj.

    I have adjusted the attached example sheet to reflect an example of this.

    Also I would much prefer a solution that does not use a SPILL formula.

    Thank you again
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,401

    Re: Return all results of partial match

    That was indeed a VERY significant ommission!

    I'll have another look ...

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,401

    Re: Return all results of partial match

    Try this instead:

    =IFNA(DROP(REDUCE("",B5:B11,LAMBDA(x,y,VSTACK(x,TOROW(XLOOKUP(TEXTSPLIT(y," "),$G$5:$G$12,$H$5:$H$12),2)))),1),"")

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,401

    Re: Return all results of partial match

    Also I would much prefer a solution that does not use a SPILL formula.
    Why?

    In C5 copied down:

    =TOROW(XLOOKUP(TEXTSPLIT(B5," "),$G$5:$G$12,$H$5:$H$12),2)

    BUT it still needs to spill to the right ...

  8. #8
    Forum Contributor
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    106

    Re: Return all results of partial match

    @AliGW you're a superstar. This works exactly as expected, thank you very much. Rep added and thread marked as solved.

    If anyone ever finds a non-SPILL solution to this I would also love to see it.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,401

    Re: Return all results of partial match

    Why are you so anti-spill formulae??? We really need to know. Is this a compatibility issue? Because if it is, then 365 did not ought to be the version in your profile. Please let us know.

  10. #10
    Forum Contributor
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    106

    Re: Return all results of partial match

    My experience with using formulas that SPILL within data formatted as a table has not been good. I often get #SPILL or #CALC issues. In general I'm not experiened with SPILL functions, and probably something I need to brush up on

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,401

    Re: Return all results of partial match

    OK - in that case, you always need to state clearly that you want to use the formulae suggested in tables, because SPILL formulae won't work in them. Please make sure that you do this in post #1 in any further threads. Thanks.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,401

    Re: Return all results of partial match

    Tr this copied across and down:

    =IFERROR(INDEX(TOROW(XLOOKUP(TEXTSPLIT($B5," "),$G$5:$G$12,$H$5:$H$12),2),,COLUMNS($C4:C4)),"")

  13. #13
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2502 and WPS V2024(12.1.0.18543)
    Posts
    3,866

    Re: Return all results of partial match

    Cell C5 formula , Drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  14. #14
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,645

    Re: Return all results of partial match

    Quote Originally Posted by 77highland View Post
    I failed to note that I have instances of similar partial matches that will conflict. E.g. RF vs RFj.
    Just add " " before and after string, then seach:
    C5:
    Please Login or Register  to view this content.

+ 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. VLOOKUP Return Results With Partial Matches
    By rpalmer9 in forum Excel General
    Replies: 5
    Last Post: 05-12-2023, 05:45 PM
  2. Partial Match Lookup with Multiple Results
    By rogers14223 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-16-2023, 04:33 PM
  3. [SOLVED] Search Partial Match and return results on form
    By Andy C. in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-05-2022, 05:43 PM
  4. Partial Match formula is not giving 100 % results.
    By ahsan.masood1980 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-08-2020, 10:23 AM
  5. [SOLVED] Partial Match Search Results on User Form
    By matt7416 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2020, 05:01 AM
  6. [SOLVED] Return results based on partial (contains) from another Column
    By masond3 in forum Excel General
    Replies: 1
    Last Post: 07-17-2019, 01:36 PM
  7. [SOLVED] Lookup partial values and if match return partial value from another cell
    By Renejorgensen in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2017, 07:53 AM

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