
Originally Posted by
SamT
With ActiveSheet
If .Range("A1") <> "NAME" Then
For each Row
If Row = Duplicate Then
Row.Delete
End If
Next
End If
End With
Thanks SamT. Unfortunately, I am getting "Compile error: syntax error" at
and "variable not defined" for Duplicate.
I have tried to fix it thus:
With ActiveSheet
Dim Row As Variant
Dim Duplicate As Variant
If .Range("A1") <> "NAME" Then
For Each Row In .Range
If Row = Duplicate Then
Row.Delete
End If
Next
End If
End With
but this has resulted in "Run Time error 450 Wrong number of arguments or invalid property assignment".
Please could you help fix this?