Could you check for me see why the second condition not working:
Sub ConditionalDeleteRows()
On Error Resume Next
Range("A1").AutoFilter Field:=7, Criteria1:="<9000", Operator:=xlOr, Criteria2:=">16000"
Range("B1").AutoFilter Field:=8, Criteria1:="<800", Operator:=xlOr, Criteria2:=">1000"
If Err = 0 Then _
Range("A2", Range("A65536").End(xlUp)).SpecialCells(xlCellTypeVisible).EntireRow.Delete
On Error GoTo 0
ActiveSheet.AutoFilterMode = False
End Sub
Thanks.
jqzhang
Sub ConditionalDeleteRows()
On Error Resume Next
Range("A1").AutoFilter Field:=7, Criteria1:="<9000", Operator:=xlOr, Criteria2:=">16000"
Range("B1").AutoFilter Field:=8, Criteria1:="<800", Operator:=xlOr, Criteria2:=">1000"
If Err = 0 Then _
Range("A2", Range("A65536").End(xlUp)).SpecialCells(xlCellTypeVisible).EntireRow.Delete
On Error GoTo 0
ActiveSheet.AutoFilterMode = False
End Sub
Thanks.
jqzhang