Hi I'm trying to clear same values in one column for the same auction id but it's clear all the same values in one column, and I have more than 11000 data:
Private Sub clearallunits_Click()
Application.ScreenUpdating = False
Dim N As Long, allunits As Long, rlook As Range
N = Cells(Rows.Count, "A").End(xlUp).Row
For allunits = N To 2 Step -1
Set rlook = Range(Cells(allunits - 1, "D"), Cells(1, 1))
If Application.WorksheetFunction.CountIf(rlook, Cells(allunits, "D")) > 0 Then
Cells(allunits, "D").Clear
End If
Next allunits
Application.ScreenUpdating = True
End Sub
my attachment is (sheet1 my data) and (sheet2 the result that I need) any idea for that?
Bookmarks