VBA Match String Percentage

Hi experts,

Does anyone have a vba function that can tell you the percentage match of two strings.  So that I could compare two cells and and get a percentage that they match.

Thanks,
Montrof
LVL 1
montrofAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Montrof ,

Can you give more details about what you are trying to do.

Also an example workbook always help..

Saurabh...
montrofAuthor Commented:
I am trying to compare values like such

Cell A1- Cat compare to Cell B1 Cap so they match at 66% since 2 of the 3 characters match.  

Montrof
Saurabh Singh TeotiaCommented:
Help me Understand which is your base i.e. A1 or B1 hat i mean by that is let's say

If A1-->Cat
B2-->Capsule

How much % whether its 66% if cat is base or 28% if capsule is base...

Saurabh...
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

ProfessorJimJamMicrosoft Excel ExpertCommented:
well. i remember genius guy named Alan from mrexcelmsgboard had a very good UDF sophisticated and brilliant. i twisted it, so that it works for you.

see attached file.  i recommend you always use the 3rd algorithm.

 2015-05-26-17-03-08-Microsoft-Excel---PePercentage-Match.xlsm

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aikimarkCommented:
Look at the Levenshtein algorithm:
http://en.wikipedia.org/wiki/Levenshtein_distance

There are several other algorithms listed at the bottom of that wiki article that might be worth consideration.  These algorithms have been around long enough that there are coding examples in most languages, including VBA.
montrofAuthor Commented:
Perfect Thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.