I am trying to build a code that could filter and delete some 35,000 rows.
I used the below codes but it is taking lot of time(more than 10 mins), can anyone please help me to make it quicker?
Code 1 :
Range("$A$1:$S$50000").AutoFilter Field:=19, Criteria1:="Delete"
ActiveSheet.AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).Delete (xlShiftUp)
Code 2 :
Dim RngToDelete As Range
Range("$A$1:$S$50000").AutoFilter Field:=19, Criteria1:="Delete"
Set RngToDelete = Selection.SpecialCells(xlCellTypeVisible)
RngToDelete.Delete
Thanks, Amith