Hi
I'm trying to delete rows which DO NOT contain value "302" in colE to leave me with just the rows which do contain the value. Tried a loop but with over 65K rows it is taking too long.
Got the below but it is deleting all rows including those with 302 in colE. Anyone able to suggest where I'm going wrong?
I'm trying to delete rows which DO NOT contain value "302" in colE to leave me with just the rows which do contain the value. Tried a loop but with over 65K rows it is taking too long.
Got the below but it is deleting all rows including those with 302 in colE. Anyone able to suggest where I'm going wrong?
VBA Code:
Sub FilterSubInv()
Application.ScreenUpdating = False
Columns(5).AutoFilter 1, Criteria1:="<>302"
With Range("a2", Range("g" & Rows.Count).End(3))
With ActiveSheet.AutoFilter.Range.Offset(1)
.EntireRow.Delete
End With
End With
Columns(7).AutoFilter
Application.ScreenUpdating = True
End Sub