Hi, I am trying to clear the contents (not deleting) for duplicates of the Range A36:G36 and downwards (only the duplicated values should be deleted, the original should not be cleared).
Right now I have some code that do almost what I am after. The problem is that it is clearing the full row, not just range A:G.
How can I make it work with just the Range and not the full row?
Here is the code I got:
Right now I have some code that do almost what I am after. The problem is that it is clearing the full row, not just range A:G.
How can I make it work with just the Range and not the full row?
Here is the code I got:
Code:
Sub RemoveDuplications()
Dim X As Long
For X = 1 To Range("A" & Rows.Count).End(xlUp).Row
If Application.WorksheetFunction.CountIf(Range("A36:A" & X), Range("A" & X).Text) > 1 Then Rows(X).ClearContents
Next
End Sub