Your code isn't that bad for a self-proclaimed noob. Well done.
Deleting many non-contiguous rows can take a lot of time. This is a known issue. One method to make it faster is to sort your filtered data so they are one contiguous block of rows and then delete them.
After you autofilter the data:
1.) In an empty column, put a value (any value) for the filtered rows you want to delete.
2.) Sort on that column (sorting is fast). That will put all the rows you want to delete in one contiguous block.
3.) Delete the rows.
Example: uses column Z as the temporary helper column to sort on.
If rCount <> 0 Then ' ensures the code below will only activate if there is a row to delete!
ActiveSheet.UsedRange.Columns("Z").SpecialCells(xlCellTypeVisible).Value = "z"
ActiveSheet.UsedRange.AutoFilter
Columns("A:Z").Sort Key1:=Range("Z2"), Order1:=xlDescending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("Z2", Range("Z" & Rows.Count).End(xlUp)).EntireRow.Delete
Range("Z1").ClearContents
End If
Application.DisplayAlerts = True
.AutoFilterMode = False
End With
End Sub
Bookmarks