Comparing two strings for % match

G

Guest

Does anyone have a little vba trick for comparing two strings to see how
close they are? I am trying to match two databases the field that will put
them together was entered by several different people to the tune of about
26,000 records and there may be slight differences. I tried using SQL Like
Command and changing one string To include "%" every other character, but the
problem is not all of the letters in that string may be in the other. If I
could test for a percentage of comparison, I could adjust to narrow my hits.
I am using Access2003
Any help is greatly appreciated
 
A

Andi Mayer

Does anyone have a little vba trick for comparing two strings to see how
close they are? I am trying to match two databases the field that will put
them together was entered by several different people to the tune of about
26,000 records and there may be slight differences. I tried using SQL Like
Command and changing one string To include "%" every other character, but the
problem is not all of the letters in that string may be in the other. If I
could test for a percentage of comparison, I could adjust to narrow my hits.
I am using Access2003
Any help is greatly appreciated

try
http://groups-beta.google.com/groups?q=soundex+group:*access*&hl=en&btnG=Google+Search
 
G

Guest

This would be great, but I am working with any number of letters numbers and
the occasional -
 
J

John Nurick

Hi Ken,

Try googling for "levenshtein distance". The distance between two
strings is the number of characters that need to be changed to convert
one into the other. I'm sure I've seen an algorithm on the internet
somewhere, but can't remember whether there was a VBA version.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top