Hello, new to Macros here. I have a simple spreadsheet of contacts with column headers such as name, email, company, etc.
I am trying to write a simple script that will look for duplicate email addresses (which are in column 3) and delete one of the duplicate rows. My code seems to work, but I need to run it like 5x to fully clean the list for some reason. It should be able to remove all duplicates in one run. Any help is greatly appreciated.
Sub DuplicateRemove()
Dim i As Integer
For i = 1 To 400
For j = i + 1 To 400
If Worksheets("Sheet1").Cells(i, 3).Value = Worksheets("Sheet1").Cells(j, 3).Value Then Rows(j).EntireRow.Delete
Next j
Next i
End Sub
Bookmarks