Delete Double Entries

dizzyfreedom

New Member
Joined
Jul 19, 2012
Messages
6
I need to delete pairs of rows that contain the same data in column G [which are email addresses]. I have 2 sets of data from seperate sources, merged together in a single sheet and sorted on Col G. Column A-F also have additional info [name/title/city/state, etc]. I have around 4000 rows. I need to be left with a set of data that is unique to my primary source, so anything appearing in both data sources can go. I should be left with around 800 rows [email addresses] after eliminating them.

Can you help with this? Any suggestions are welcomed! Thank you!!!
 
Select column G
Select Conditional Formatting=> Highlight Cells Rules => Duplicate Cell Values => OK. This will highlight all the duplicated values.
Custom sort the col G by color and delete the light red colored rows.
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Select column G
Select Conditional Formatting=> Highlight Cells Rules => Duplicate Cell Values => OK. This will highlight all the duplicated values.
Custom sort the col G by color and delete the light red colored rows.


THANK YOU SOOOOOOOOOOOO MUCH! This totally worked!;) Simple and easy!!!

Thank you to everyone else who offered suggestions!! You guys are great for offering potential solutions to common challenges! It's a beautiful learning process!! And it's generous of you to offer your time and knowledge!
 
Upvote 0
What are the results like cos i ran it on a sample and it did work.

The approach was to check through and every line with duplicates, change the value in column G to "TO BE DELETED", In this modified version, The text "To be deleted" is in column Z.

The macro then checks to see for lines with "To be deleted" and deletes them

Code:
Sub deletedups()
lastrow = Range("G1").End(xlDown).Row
For I = 1 To lastrow Step 1
    For j = (I + 1) To lastrow Step 1
        If Cells(I, "G").Value = Cells(j, "G").Value Then
            Cells(I, "Z").Value = "To be deleted"
            Cells(j, "Z").Value = "To be deleted"
        End If
    Next j
Next I
For k = lastrow To 1 Step -1
    If Cells(k, "Z").Value = "To be deleted" Then
        Rows(k).EntireRow.Delete
    End If
Next k
End Sub

For whatever reason on my worksheet it still left the original entry. It marked them to be deleted as you instructed...but the original entry remained. THANK YOU SO MUCH for trying!
 
Upvote 0

Forum statistics

Threads
1,215,565
Messages
6,125,583
Members
449,237
Latest member
Chase S

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