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.

Original TextOutcome by manual adjustment
ABC NEW ENERGY HOLDINGS LIMITEDABC
ABC-Poly (Taicang Harbour) LimitedABC
ABC-Poly Energy Holdings LimitedABC
Foser Electric Company (Hong Kong) LimitedFoser
Foser GroupFoser

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,215,326
Messages
6,124,256
Members
449,149
Latest member
mwdbActuary

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