This macro worked great in Office 2003 but won't work in Office 2010
Compile error
Variable not Defined.
Highlighting cell in below line
For Each Cell In Selection
Can this be fixed.
Thank you.
Compile error
Variable not Defined.
Highlighting cell in below line
For Each Cell In Selection
Can this be fixed.
Thank you.
Code:
Sub StripRowDuplicates()
Do Until ActiveCell = ""
Range(ActiveCell, ActiveCell.End(xlToRight)).Select
For Each Cell In Selection
If WorksheetFunction.CountIf(Selection, Cell) > 1 Then
Cell.ClearContents
Else
End If
Next Cell
On Error Resume Next
Selection.SpecialCells(xlCellTypeBlanks).Delete Shift:=xlToLeft
ActiveCell.Range("A2").Select
Loop
End Sub