View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
goshute goshute is offline
external usenet poster
 
Posts: 19
Default Finding Closest Text Match

On Jan 22, 7:44*am, fabio wrote:
Hi

Is it possible to compare two lists of names (for example) and return the
closest match from the second list for comparison?

Basically I was trying to do a VLOOKUP based on a list of names and a second
sheet with names and data but as these were input separately there may be
spelling differences or typos in the names. *If I could include in the values
returned the name from the second list which was closest to my LOOKUP_VALUE,
by comparing the two names I would be able to make a decision as too whether
there was a typo or that a close enough match did not exist.

I'm currently using Office 2003.

Thanks for any input.


Fabio,
Unless you have tax Id's, names are one of the hardest things to work
with and nothing I have found, or written, works 100% of the time. I
use VLOOKUP to identify direct matches only. Beyond that, VBA is the
best way to match up names, but there can be so many variables, even
this is hard. My first step is a direct comparison of the names, then
I remove any titles, then middle initials, then compare shortened
versions of the names, then I remove the vowels, then I look at the
addresses. Even if a match is found they are scruitinezed. I always
have to know if Bob Parker is the same person as Bobby Parker. Bob
Parker on Main Street may or may not be the same Bob Parker on Second
Street and Bob Parker Jr. may or may not be Bob Parker. I wind up
writting VBA routines for each file because each one is so different,
then manually scrutinize and spot check the results.

Sometimes there are so may variables, I match what I can easily do
with VLOOKUP or a simple VBA routine, and do the others by hand. You
need to be able to verify and trust your results. "Fuzzy" results can
sometimes be worse than no results.

Goshute