Duplicate Names - Yet it will not show as Duplicate in Excel

Shreesurya

Board Regular
Joined
Jul 7, 2014
Messages
50
Hi,I am struck with Below issue, and I have Data around 60,000 and unable to find a way to remove or identify the duplicates in the below Table,I would Greatly appreciate any kind of help on this.Excel 2012
ABCDEF
1CONCATENATE - Company InfoCompanyAddressCityStateZIP+4
2Mass General Hospital, 55 Fruit Street Mailcode LI 044, Boston, E2, 21142696Mass General Hospital55 Fruit Street Mailcode LI 044BostonMA02114-2696
3Mass General Hospital, 55 Fruit St Mailcode LI 044, Boston, E2, 21142696Mass General Hospital55 Fruit St Mailcode LI 044BostonMA02114-2696
4Intelisent, 880 Marshall Phelps Road, Windsor, E2, 60952107Intelisent880 Marshall Phelps RoadWindsorCT06095-2107
5Intelisent, , LLC., 880 Marshall Phelps Rd, Windsor, E2, 60952107Intelisent, , LLC.880 Marshall Phelps RdWindsorCT06095-2107
6Starts Sampling, 195 East Elk Trail, Carol Stream, E2, 601889300Starts Sampling195 East Elk TrailCarol StreamIL60188-9300
7Starts Sampling, 195 E. Elk Trail, Carol Stream, E2, 601889300Starts Sampling195 E. Elk TrailCarol StreamIL60188-9300
8Grayhair Software, 124 Gaither Drive Ste 160, Mt Laurel, E2, 08054-1719Grayhair Software124 Gaither Drive Ste 160Mt LaurelNJ08054-1719
9Grayhair Software Inc, 124 Gaither Dr Ste 160, Mt Laurel, E2, 08054-1719Grayhair Software Inc124 Gaither Dr Ste 160Mt LaurelNJ08054-1719
10Newkirk, LLC, 15 Corporate Circle, Albany, E2, 12203-5177Newkirk, LLC15 Corporate CircleAlbanyNY12203-5177
11Newkirk, 15 Corporate Cir, Albany, E2, 12203-5177Newkirk15 Corporate CirAlbanyNY12203-5177

<colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /><col /><col /><col /><col /></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
This would give you about a 95% probability of eliminating duplicates. Might require minimal editing.
Code:
Sub delstuff()
Dim sh As Worksheet, lr As Long, i As Long, spAry As Variant, spArr As Variant
Set sh = Sheets(1) 'Edit sheet name
lr = sh.Cells(Rows.Count, 3).End(xlUp).Row
    For i = lr To 3 Step -1
        With sh
            spAry = Split(.Cells(i, 3).Value, " ")
            spArr = Split(.Cells(i - 1, 3).Value, " ")
            If spAry(LBound(spAry)) = spArr(LBound(spArr)) And Left(spAry(LBound(spAry) + 1), 1) = _
                Left(spArr(LBound(spArr) + 1), 1) And .Cells(i, 6) = .Cells(i - 1, 6) Then
                    Rows(i).Delete xlUp
            End If
        End With
    Next
End Sub

The only ones that I calculate would be missed would be if somebody is dislexic and reverses the sequence of the street address or if two comapanys share the same address.
 
Last edited:
Upvote 0
Thank you So Much For your Code JLGWhiz, Truly Awesome,

However I don't want to delete the duplicate, It should be highlighted, Request you to help to modify the Code...
 
Upvote 0
Thank you So Much For your Code JLGWhiz, Truly Awesome,

However I don't want to delete the duplicate, It should be highlighted, Request you to help to modify the Code...

This should highlight the duplicate rows.
Code:
Sub delstuff()
Dim sh As Worksheet, lr As Long, i As Long, spAry As Variant, spArr As Variant
Set sh = Sheets(1) 'Edit sheet name
lr = sh.Cells(Rows.Count, 3).End(xlUp).Row
    For i = lr To 3 Step -1
        With sh
            spAry = Split(.Cells(i, 3).Value, " ")
            spArr = Split(.Cells(i - 1, 3).Value, " ")
            If spAry(LBound(spAry)) = spArr(LBound(spArr)) And Left(spAry(LBound(spAry) + 1), 1) = _
                Left(spArr(LBound(spArr) + 1), 1) And .Cells(i, 6) = .Cells(i - 1, 6) Then
                    .Cells(i - 1, 1).Resize(2, 1). EntireRow.Interior.ColorIndex = 6
            End If
        End With
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,135
Messages
6,129,075
Members
449,485
Latest member
greggy

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