How to compare two lists of text and provide a matching level in percentage

cga4200

New Member
Joined
Jul 27, 2014
Messages
1
Hello all,

I wish to compare a list of text (Name to Match) to a static list of text (Standard Name) and pull the best match from the static list along with a matching value in percentage.

The values under the Standard Name column are static values. The values under Name to Match are string values for which I would like to find the best match from Standard name column. For instance if under column Name to Match, I have Coca-Cola Company, the code should pull The Coca-Cola Company as the best match and provide an matching level of, let's say, 95%. The accuracy levels on the table an approximation of I would like the code to do.

[TABLE="class: grid, width: 700"]
<tbody>[TR]
[TD]Standard Name[/TD]
[TD][/TD]
[TD]Name to Match[/TD]
[TD]Matching Standard Name[/TD]
[TD]Accuracy[/TD]
[/TR]
[TR]
[TD]The Coca-Cola Company[/TD]
[TD][/TD]
[TD]Gap[/TD]
[TD]The Gap Inc.[/TD]
[TD]95[/TD]
[/TR]
[TR]
[TD]The Gap Inc.[/TD]
[TD][/TD]
[TD]Coca-Cola Company[/TD]
[TD]The Coca-Cola Company[/TD]
[TD]95[/TD]
[/TR]
[TR]
[TD]Bank of America[/TD]
[TD][/TD]
[TD]Coca-Cola Financial[/TD]
[TD]The Coca-Cola Company[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]Countrywide Financial Corporation[/TD]
[TD][/TD]
[TD]Contrywide[/TD]
[TD]Countrywide Financial Corporation[/TD]
[TD]70%[/TD]
[/TR]
[TR]
[TD]AOL LLC[/TD]
[TD][/TD]
[TD]AOL LLC[/TD]
[TD]AOL LLC[/TD]
[TD]100%[/TD]
[/TR]
[TR]
[TD]Six Flags Inc[/TD]
[TD][/TD]
[TD]Tennis Supplies[/TD]
[TD]No Match[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Northrop Gurman Corp.[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I have tried using a VLOOKUP with the [range_lookup] parameter set to TRUE-Approximate Match, but it does not yield the desired results. I would like to use VBA to solve this problem, would somebody please point me in the right direction?

Thank you
AC
 

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