Hi raehippychick,
Changed the code and it should now do what you want. Perhaps not the most elegant of code but it works
Sub RemoveDuplicatesGeneric()
'' Delete duplicate entries.
Dim rngAnswer As Range
Dim intCnt As Integer, intR As Integer, intI As Integer
Dim intRow As Integer, intCol As Integer
Dim startCel, endCel
On Error Resume Next
Set rngAnswer = Application.InputBox("Please choose the first cell of the range to examine for duplicates.", Type:=8)
If rngAnswer Is Nothing Then Exit Sub
If rngAnswer.Count <> 1 Then Exit Sub
On Error GoTo 0
intRow = rngAnswer.End(xlDown).Row
intCol = rngAnswer.Column
Application.ScreenUpdating = False
intCnt = Application.WorksheetFunction.CountA(Range(rngAnswer, Cells(intRow, intCol)))
For intR = intRow To (intRow - intCnt + 2) Step -1
If Cells(intR, intCol).Value = Cells(intR, intCol).Offset(-1, 0).Value Then
x = Cells(intR, intCol).Address
startCel = Range(x).Offset(0, -1).Address
endCel = Range(x).Offset(0, 8).Address
Range(startCel, endCel).Delete
End If
Next intR
End Sub
Regards
Bookmarks