+ Reply to Thread
Results 1 to 8 of 8

Fuzzy Lookup

  1. #1
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    548

    Fuzzy Lookup

    I used to have an add in called Fuzzy Lookup from Microsoft and our IT department cant seem to get it installed on my 0365 excel. It is really useful so looking for alternatives. I did find some code online but it still doesn't seem to work right.

    I have two tables and I want to find the closest match so I can perform a vlookup to that table. So example one table has the name James, Maynard and the other table has James MD, Maynard. Is there a way to replicate the fuzzy lookup somehow?


    Thank you.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Fuzzy Lookup

    It still seems to be OK for me!!

    However there may be alternatives. Please post a sample sheet with a few rows of representative data.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    548

    Re: Fuzzy Lookup

    Absolutely, Thanks.

    Here is a sample file with 2 pseudo tables. Would like to run a fuzzy lookup in table 2 that looks into table 1 and returns employee ID.

    The code I tried didn't seem to work but I know I am not nearly as versed as you gentlemen with this stuff.

    Thank you kindly for your time.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-09-2021
    Location
    New York
    MS-Off Ver
    Office 2019
    Posts
    145

    Re: Fuzzy Lookup

    Hi wherdzik,

    I'd like an attempt to help but the solution I found is more complex that using functions and uses VBA (may need to switch this post to VBA):

    Here is the I found website regarding this:
    HTML Code: 
    You need the function code and add it in a module:
    On Table 2 B2:
    Please Login or Register  to view this content.

    Hope this helps.
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Fuzzy Lookup

    Here's a stonker of a formula (from Bo_Ry):

    =LOOKUP(1,1/FREQUENCY(0,1/MMULT(1-ISERR(SEARCH(TRIM(MID(SUBSTITUTE(A2," ",REPT(" ",50)),{0,1,2,3,4}*50+1,50)),'Table 1'!$A$2:$A$12)),{1;1;1;1;1})),'Table 1'!$B$2:$B$12)

    I'll be honest and say I don't fully understand it myself yet!!
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    548

    Re: Fuzzy Lookup

    Good Lord, I struggled with that vba code and I could not get it to shine. Glen, thank you for your help. Those are wonderful!

    Thank you for always willing to help!
    Much appreciated again!

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Fuzzy Lookup

    Quote Originally Posted by Glenn Kennedy View Post
    Here's a stonker of a formula (from Bo_Ry)
    The formula is not a really good Fuzzy match.
    It split word by comma and search all the words in the Lookup table1.

    eg: Add this name "Rah, AHSA" to table2 and "Rah, AHS" to Table1

    split word by comma to "Rah" and "AHSA" and search in Table2

    Search Rah found in "RAH, IHTESM-UR" and "Rah, AHS"
    But the formula doesn't know that "AHSA" is a closer match to "AHS".
    It just returns the first match which is "RAH, IHTESM-UR" 11111


    The Better way is to use Power Query Fuzzy Match
    https://support.microsoft.com/en-us/...4-bd3962b90649

    Create Table1 and Table2 , Ctrl+T


    Open Power Query/Get and Transform. Click on New Query.

    Open blank query in the editor, launch Advanced Editor and paste in the following code.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    11-19-2019
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    548

    Re: Fuzzy Lookup

    thank you for sharing ..i have never realized this can be done in powerquery...I use powerquery quite a but but definitely not to this level but I will keep that in the back of my pocket.
    Thanks again.

+ 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. Macro for Fuzzy Lookup Add-in
    By renahearn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2024, 07:01 AM
  2. [SOLVED] Fuzzy Lookup
    By RSRSRS in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-20-2019, 04:36 PM
  3. Replies: 1
    Last Post: 08-24-2015, 10:42 AM
  4. fuzzy lookup add on, specifying what to match against
    By IronCladRooster in forum Excel General
    Replies: 0
    Last Post: 08-14-2014, 10:06 AM
  5. Using Fuzzy lookup add in
    By akshaykadidal in forum Tips and Tutorials
    Replies: 1
    Last Post: 01-07-2014, 08:21 AM
  6. Fuzzy Lookup
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-13-2012, 09:49 PM
  7. Fuzzy Lookup
    By nander in forum Excel General
    Replies: 3
    Last Post: 06-15-2012, 02:44 PM

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