How to ascertain that two names relate to the same person?

peskywinnets

Registered User.
Local time
Today, 05:00
Joined
Feb 4, 2014
Messages
578
Odd title...let me explain.

Two names provided for a transaction (one name provided by Ebay ...and one name by Paypal)
Code:
[B]Ebay[/B]             [B]Paypal[/B]
B C Smith     Brad Smith

what processing can I do to get access to work out they're the same person? Presently the person's name would appear twice on the shipping label, for example

B C Smith
Brad Smith
12 High St
London

My immediate thought is to check the first initial of the christian name *and* make sure the surname are the same - that ought to do it!

but how can I 'trap' the surname to compare the two (bearing in mind it'll be different for each customer) ...the one constant is that the surname will likely have a space before it - but how do I 'capture' the surname?
 
I think the best you can get is "higher probability", but that may be sufficient --depends on the application.

You could check other fields and values such as
-address/city/postal code
-phone number
-email
-age/DOB
-whatever you have to work with, you can even weight some of these factors...

The more matches the more likely its the same, but not absolute.

Good luck.
 
Actually, I found a routine immediately after posting the question, here it is...

(ref https://stackoverflow.com/questions...t-name-from-a-range-having-suffixes-using-vba )

Code:
Public Function LastName(sIn As String) As String
  Dim Ka As Long, t As String
  ary = Split(sIn, " ")
  Ka = UBound(ary)
  t = ary(Ka)

  If t = "jr" Or t = ",jr" Or t = "sr" Or t = ",jr." Then
    Ka = Ka - 1
  End If

  t = ary(Ka)
  If InStr(1, t, ",") = 0 Then
    LastName = t
    Exit Function
  End If

  bry = Split(t, ",")
  LastName = bry(LBound(bry))
End Function

It seems to be a good starting point
 
But perhaps not the easiest code to understand on first reading ...
 
Start yes, but you will/could encounter names like
Oscar de la Roja
Ali vant Goor
Jean Phillip Maston

Your name suffixes (yourJr) could also include

Jr Sr Esq BA, BSc .....MD


What is bry?
I suggest you identify what your want to check and then reconstruct your starting code using more explicit naming.
Good luck.
 
Start yes, but you will/could encounter names like
Oscar de la Roja
Ali vant Goor
Jean Phillip Maston

Even with complicated/non standard surnames, all I need to compare would be the First initial of the first name & the bulk of the surname, for example...

Oscar de la Roja
Alivant Goor
Jean Phillip Maston

...so essentially I need a way of isolating/stripping out the last part of the name provided to me (& the code I found does it well - though I agree it's not the easiest to read!)
 

Users who are viewing this thread

Back
Top Bottom