Deleting rows with Advance Filter in recorded Macro
Thank you, I had a loop performing this, but thought the autofilter would be
faster, and it is.
" wrote:
I would try something like this:
Looping through values in Column A and deleting the rows for cells
containg your criteria.
This would be quite slow for 65,000 lines though.
There may be a better way.
And I'm not sure if there are any flaws in my code.
Sub DeleteEntries()
Range("A1").Select
Do Until IsEmpty(ActiveCell)
If ActiveCell.Value = "DCNSU" Or ActiveCell.Value = "DUPCTRL" Then
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Somethinglikeant
|