Assuming that:
1) Row 1 is titles, not part of the data, then we can use an autofilter to delete all the duplicates all at once.
2) You want to keep the first instance of each value in the designated column (MyCol in the macro)
3) You edit this macro so that MyCol is the column number you wish to evaluate by
Option Explicit
Sub DeleteDupesByOneColumn()
'Jerry Beaucaire 5/20/2010
'Based on column of choice, first instance
'of each value is kept, all others deleted
Dim MyCol As Long 'column to test for duplicates
Dim LastRow As Long 'last row of data
Dim LastCol As Long 'last column of data
Application.ScreenUpdating = False
MyCol = 3 '<< edit this number: 1 = column A, 2 = column B, etc...
LastRow = Cells.Find("*", Cells(Rows.Count, Columns.Count), _
SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
LastCol = Cells.Find("*", Cells(Rows.Count, Columns.Count), _
SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column + 2
'Add Autofilter and delete dupes
Cells(1, LastCol) = "key"
Range(Cells(2, LastCol), Cells(LastRow, LastCol)).FormulaR1C1 = _
"=IF(COUNTIF(R1C" & MyCol & ":RC" & MyCol & ",RC" & MyCol & ")=1,""Good"",""Dupe"")"
Columns(LastCol).AutoFilter Field:=1, Criteria1:="Dupe"
LastRow = Cells(Rows.Count, LastCol).End(xlUp).Row
If LastRow > 1 Then _
Range("A2:A" & LastRow).SpecialCells(xlCellTypeVisible) _
.EntireRow.Delete xlShiftUp
ActiveSheet.AutoFilterMode = False
Columns(LastCol).ClearContents
Application.ScreenUpdating = True
End Sub
Bookmarks