Rate Similarity of Two Columns

kmprice710

Board Regular
Joined
Jan 8, 2014
Messages
87
Office Version
  1. 2019
Platform
  1. Windows
I have two columns of two data that are name-matched but they're not exactly the same.
Column A Column B
Dave Adams David Adams
John C. Hall Jack Hall
Pam Benedict Pamela Benedict

I'd like to have Excel look at the two cells for each row and say how similar they are, like 90%, 80%, etc. I don't need to know if they're exact matches. I know they're not; I do need to pick out ones that are the furthest from being matches.
Is there a way to do this?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You could utilize Power Query's fuzzy matching algorithm and then incorporate the SimilarityColumnName option to obtain the percentage match according to that algorithm. Starting with this table:
Book6
AB
1Name1Name2
2Dave AdamsDavid Adams
3John C. HallJack Hall
4Pam BenedictPamela Benedict
Sheet1

Power Query delivers this result:
Book6
ABC
1Name1Name2Similarity
2Dave AdamsDavid Adams0.41
3John C. HallJack Hall0.37
4Pam BenedictPamela Benedict0.41
Merge1

The M code for producing this result:
Power Query:
let
    Source = Table.FuzzyNestedJoin(Table1, {"Name1"}, Table1, {"Name2"}, "Table1", JoinKind.LeftOuter, [IgnoreCase=true, IgnoreSpace=true, Threshold=0.3, SimilarityColumnName="Similarity"]),
    #"Expanded Table1" = Table.ExpandTableColumn(Source, "Table1", {"Similarity"}, {"Similarity"})
in
    #"Expanded Table1"
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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