Watch this example on YouTube
Sub DeleteDuplicated()
Dim Rng As Range
Dim ColumnCounter As Integer
Set Rng = ActiveSheet.UsedRange.Rows
For r = Rng.Rows.Count To 1 Step -1
ColumnCounter = 0
For Col = Rng.Columns.Count To 1 Step -1
If Application.WorksheetFunction.CountIf(Rng.Columns(Col), Rng.Cells(r, Col)) > 1 Then
ColumnCounter = ColumnCounter + 1
End If
Next Col
If ColumnCounter = Rng.Columns.Count Then
Rng.Rows(r).EntireRow.Delete
End If
Next r
End Sub
Strange it works in the video but not working for me..
ReplyDelete