Compare two text strings in VBA?

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
810
Office Version
  1. 365
Platform
  1. Windows
Hello, is it possible to compare two text-strings in Excel?

For example, with Fuzzy Lookup I can do put in two strings like this:

Eastbourne & Bluebell Railway, 1066

And

1066 and the Bluebell Railway in Eastbourne.


This would result in something like a 0.74 match (or 74%) which I would consider to be a duplicate tour.

Meanwhile, something like Stratford & Avon Weekend and A weekend at Scarborough would be a 0.55 match so not comparable and thus different tours.


Is this function in VBA at all? We have various tools to compare tours and disqualify them for similarity however this is the last piece of functionality we need. Thank you!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
What exactly do you want to do in VBA?
 
Upvote 0
What exactly do you want to do in VBA?

It's in the first post, I want to take two strings and compare them, with the match percentage given as the output.

Fuzzy lookup has this functionality but it's cumbersome to use and I would like it done in VBA as it will be part of a selection process that uses 100% VBA. Thank you.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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