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
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Feb 24, 2010 at 06:16 AM
Related:
- Column comparison
- How to delete column in word - Guide
- Tweetdeck remove column - Guide
- Excel copy column from one sheet to another automatically - Guide
- Excel count occurrences of string in column - Guide
- Excel vba find last non empty cell in column - Guide
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
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
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Feb 24, 2010 at 06:16 AM
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
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