Fuzzy Matching - new version plus explanation

al_b_cnu

Well-known Member
Joined
Jul 18, 2003
Messages
4,546
It has been a while since I originally posted my Fuzzy matching UDF’s on the board, and several variants have appeared subsequently.

I thought it time to ‘put the record straight’ & post a definitive version which contains slightly more efficient code, and better matching algorithms, so here it is.

Firstly, I must state that the Fuzzy matching algorithms are very CPU hungry, and should be used sparingly. If for instance you require to lookup a match for a string which starts with, contains or ends with a specified value, this can be performed far more efficiently using the MATCH function:
Fuzzy Examples.xls
ABCDE
1Starts WithEndsContains
2BilljelenBill
3Mr Bill Jelen433
4Bill Jelen
5Joe Bloggs
6Fred Smith
MATCH Example


... Continued ...
 
also you don't 'run' anything persay

they're functions

=fuzzyvlookup($B3,$A:$A,1,,,C$2)

that is from the example above on how he uses fuzzyvlookup
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Confused

I have followed the directions on how to add this VBA in. I copied the data sets and when I try to use the formulas, I get the standard #VALUE! output.

I have basically no experience with VBA. What could I be doing wrong?

Thanks a lot!
 
Upvote 0
Hi,

Can you post an example using Colo's HTMLMaker (see bottom of this webpage for a link for the download)
 
Upvote 0
Sorry it took so long

Sorry, how do you get that to work - to post my sheet I mean?

Can anyone get this VBA to work and save and e-mail it?[/code]
 
Upvote 0
Hi Grodek,

Email me your s/sheet as is, tell me what you want doing & I'll have a look.

Alan
 
Upvote 0
Well, you forgot to specify the Index argument ( 3rd argument ), which is wrong. The only value that could be in a 1 column table is 1 . What are you trying to specify in cells C2 and D2 ... Rank? If so, then you can't have a blank in E2!
 
Upvote 0
I know this post is super old, but I am hoping that someone still gets the email notification and can help me understand what I have gotten myself into. I know zero VBA, so I am probably missing something simple.

I am trying to compare two lists of retail products based on the name only. My hope is to find the two product that are the closest based on the similarity of the texts. If one item has the words "apple cider" in it I would like to know how many others have "apple cider" (or something close to it).

I pasted the fuzzyvlookup VBA into a new module. It seems to be OK, but when I enter the data & formulas I get a #NAME result.

Do I need to name ranges, or customize any of the VBA in any way?
test match with formula.xls
ABCDEFGH
1
2FuzzyPercent-Algorithm
3Vendor1Vendor2123123
4#2CoffeeFiltersAppleCider#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?
5#4CoffeeFilters100%PruneJuice#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?
610-12CupCoffeeFitlersAllPurposeFlour#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?
7AllPurposeFlourAngelFoodCake#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?
8AluminumFoil-25ft.AnimalCookies#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?
9AluminumFoil-37.5ftAppleJuiceConcentrate-Froz#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?
Sheet1
 
Upvote 0
unc2plo

I posted in this site months ago, and I did not get a notification that you posted today. I can't help you but maybe you should send a message to AL__B_CNU though the board for help.

Cheers
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top