horizonflame
Board Regular
- Joined
- Sep 27, 2018
- Messages
- 186
- Office Version
- 2013
Hi All
Just a quick one - can I check the error handler covers all my autofilter criteria? I can't avoid the errors occurring on any of the criteria, I just want to skip over.
Many Thanks
Just a quick one - can I check the error handler covers all my autofilter criteria? I can't avoid the errors occurring on any of the criteria, I just want to skip over.
Code:
Sub DataRaw()
Sheets("DataInput").Select
On Error Resume Next
Selection.AutoFilter
ActiveSheet.Range("$A$2:$W$20000").AutoFilter Field:=11, Criteria1:= _
"=Waste", Operator:=xlAnd
ActiveSheet.Range("$A$2:$W$20000").AutoFilter Field:=14, Criteria1:=">0", _
Operator:=xlAnd
ActiveSheet.Range("$A$2:$W$20000").AutoFilter Field:=1, Criteria1:=Array("<>*cost*", _
"<>*refurb*", _
"<>*rfbr*"), _
Operator:=xlFilterValues
On Error GoTo 0
End Sub
Many Thanks
Last edited: