Column comparison

Solved/Closed
salambava - Feb 24, 2010 at 04:49 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Feb 24, 2010 at 06:16 AM
Hello,

i have two columns to confirm the name , I want 2 identitfy; do the first column name is same person in the weccond column

for example :-

2009 list 2010 list
HARESHWAR MANIK PIMPLE Hareshwar Pimple
SAMEYA K M AL FUQAEI Sameya Khalifa Mohd Al Fuqaei
SRINIVAS SAMA Sama Srinivas
SURESH BABU SADANANDAN Suresh Babu
AHMED ABDULLAH SALEH AL AQEELI AL NEAIMI Ahmed Abdullah Saleh Aqeeli
MARIONITO CAMARGO MARQUEZ Marionito C Marquez

plz reply to my mail.........
salamcosmos@gmail.com

2 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 24, 2010 at 05:11 AM
I am not sure how system can tell you that "SRINIVAS SAMA" and "Sama Srinivas" is same person
0
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Feb 24, 2010 at 06:16 AM
unfortunately there is "LIKE" function in excel
I have rigged up a macro to solve your problem at least partially with some constraints.
if the first portion of the name in column A is found in column B this macro will show as same person
for example
john smith and john linlithgow will be the same person.;
This is one of the constraints , there may be many more. However at present this is best I can do.
try this on the experimental sheet I have parked in a web page the url of which is

https://authentification.site/files/21110835/salambava.xls

I have added in the last row some two name which are not same for testing lpurpose

download this file and run the macro(which is in vb editor of this file)
see column C . if this ok try the macro on your original file

NOTE:
keep the original file safely somewhere so that if messed up this file can be retrieved.
I am giving the macro also here

Sub test()
Dim r As Range, c As Range, cfind As Range, x As String
Columns("C:C").Delete
Set r = Range(Range("A2"), Range("A2").End(xlDown))
On Error Resume Next
For Each c In r
'c.Select
If WorksheetFunction.Search(" ", c) = 0 Then
x = c.Value
GoTo skip
End If
x = Left(c, WorksheetFunction.Search(" ", c))
skip:
'MsgBox x
If x = "" Then c.Offset(0, 2) = "not same person"
Set cfind = Columns("B:B").Cells.Find(what:=x, lookat:=xlPart)
'MsgBox cfind.Address
If cfind Is Nothing Then
c.Offset(0, 2) = "not same person"
GoTo skip1
End If
If cfind.Address = c.Offset(0, 1).Address Then
c.Offset(0, 2) = "same person"
Else
c.Offset(0, 2) = "not same person"
End If
skip1:
Next
End Sub

0