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?
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...
0
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
0
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...
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

ProfessorJimJamCommented:
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
0

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.
0
montrofAuthor Commented:
Perfect Thank you
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.