Fuzzy Match Without Fuzzy Lookup Add in, Power Query and VBA

ashish002

New Member
Joined
Jul 5, 2021
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hi,

Is there a formula to find out all the possible fuzzy/partial matches for a single value (there is only one column in the sheet)?

Column A has all the data (there are some duplicate values which can be found out using conditional formatting). Apart from that there are many values like Samsung, Samsung Inc, Samsung Corp, The Samsung)

If i type the formula in cell B1, it should give me all the possible partial match values for cell A1 and likewise

Note: Fuzzy Lookup add in, power query and vba cannot be used

Thanks in advance
 
You're welcome!

I dummied up 25,000 rows of column A and copied down the column D formula 200 rows and it took about 2.5 seconds on my small laptop.

It's mostly a function of how many rows you copy down the AGGREGATE formula. (i.e. how many hits you may find). You could remove the IFERROR, if you're OK to get #NUM! errors after the last hit, which would give a marginal performance increase but apart from that I don't see how it could be made faster.

Ashish202.xlsx
ABCD
1SamsungAppleApple
2Samsung IncApple Corp.
3Samsung CorpApple Corp
4The SamsungThe Apple
5AppleApple
6Apple Corp.Apple Corp.
7Apple CorpApple Corp
8VONSThe Apple
9The VONSApple
10The AppleApple Corp.
Sheet1 (2)
Cell Formulas
RangeFormula
D1:D10D1=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$25000)/(ISNUMBER(SEARCH($B$1,$A$1:$A$25000))),ROW())),"")
Hi, I got one more thing to ask

This formula is awesome, if i have to find all possible matches for just one word.

Can we change this formula to find all the possible matches for all the words in column A at one go?

To me it seems like excel limitation.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Perhaps if you load your sample data to Box.net or some other third party file, we can get you where you need to be with this option. I am not sure what you mean by your version being different. Do you mean Excel or your file is set up differently. Anyway, some sample data would go a long way to helping you.
 
Upvote 0
Perhaps if you load your sample data to Box.net or some other third party file, we can get you where you need to be with this option. I am not sure what you mean by your version being different. Do you mean Excel or your file is set up differently. Anyway, some sample data would go a long way to helping you.
By different version i mean, mine is office 2016 and yours i noticed that it is office 365 if am not wrong.

I am posting the link for sample file.

 
Upvote 0
There should be no difference in how PQ works in 2016 and 365 except for intellisense which you do not need for this project. I am trying to understand what your last request was. Would a count of each name be what you are looking for. Here is an example of what I mean.

Fuzzy Match File.xlsx
AB
1Company NameCount
2Ab Bernat1
3Abata2
4Abatz3
5Abby Stribling1
6Abbye Moth1
7Abner Warrender1
8Abran Tuckerman1
9Ada Huonic1
10Adair Scamel1
Dupe
 
Upvote 0
There should be no difference in how PQ works in 2016 and 365 except for intellisense which you do not need for this project. I am trying to understand what your last request was. Would a count of each name be what you are looking for. Here is an example of what I mean.

Fuzzy Match File.xlsx
AB
1Company NameCount
2Ab Bernat1
3Abata2
4Abatz3
5Abby Stribling1
6Abbye Moth1
7Abner Warrender1
8Abran Tuckerman1
9Ada Huonic1
10Adair Scamel1
Dupe
Column A has all the data as you have shown in the snapshot (there are some duplicate values which can be easily found out using conditional formatting).

Apart from that there are many values like for eg: Samsung, Samsung Inc, Samsung Corp, The Samsung). I need to find such values for every cell in column A.

If i type the formula in cell B1 and drag it down, it should give me all the possible partial/fuzzy match values for every cell in column A

Eg: Column A
Samsung
Philips
LG
General
The Samsung
Samsung Inc
The LG
LG Inc
General Electric
General Inc.
The General

For the above mentioned example, for the cell A1 i.e. Samsung i want all the possible words containing Samsung in cell B and likewise for Philips, LG & General

But, the thing here is that i cannot use Fuzzy lookup add in, nor the vba code

As far as i know, i can't even use table.fuzzynestedjoin in power query since that query and fuzzy lookup function is available only to office 365 users

Thanks again for your reply
 
Upvote 0
I forgot that Fuzzy Lookup in PQ was only just added to 365. My apologies. It does look like Toady has you covered.
 
Upvote 0
powerquery.png



@alansidman
 
Upvote 0

Forum statistics

Threads
1,214,895
Messages
6,122,128
Members
449,066
Latest member
Andyg666

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