Find duplicate from similar text

bcsyeung

New Member
Joined
Apr 21, 2011
Messages
23
Hi,

I have a long list of uncleaned data of account names with similar names. See below example. 1st col below shows that there are 5 accounts, but after manual adjustment line by line, there are only two accounts namely ABC and Foser.
Is there anyway to use formula to remove duplicates instead of eyeballing them line by line? Appreciate for your help with thanks.

[TABLE="width: 406"]
<colgroup><col><col span="2"></colgroup><tbody>[TR]
[TD]Original Text[/TD]
[TD="colspan: 2"]Outcome by manual adjustment[/TD]
[/TR]
[TR]
[TD]ABC NEW ENERGY HOLDINGS LIMITED[/TD]
[TD]ABC[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC-Poly (Taicang Harbour) Limited[/TD]
[TD]ABC[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC-Poly Energy Holdings Limited[/TD]
[TD]ABC[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Foser Electric Company (Hong Kong) Limited[/TD]
[TD]Foser[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Foser Group[/TD]
[TD]Foser[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
On what basis "ABC NEW ENERGY HOLDINGS LIMITED" is getting "adjusted" as "ABC"? Just because it is the first word in the phrase?

Also, could we have more possibilities than "ABC" and "Foser"?
 
Upvote 0
Try this.

Sub dup_to_unique()
Dim s As String, un_arr() As String, rng As Range, i As Long
s = "ABC,Foser"
un_arr = Split(s, ",")
For Each rng In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
For i = LBound(un_arr) To UBound(un_arr)
If Left(rng.Value2, Len(un_arr(i))) = un_arr(i) Then
rng.Offset(, 1).Value = un_arr(i)
End If
Next
Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top