Macro Recorder gave me an error that I selected too many criteria in my attempt, so I am stumped yet again.
I need help in writing a macro that applies filters on Row 4 on the "Master" sheet and exclude the following items below
With the remaining data, copy (starting from Row 5) Columns A, B and AM:AY and paste to the "UPLOAD TEMPLATE" worksheet that is already created starting in A6.
I need help in writing a macro that applies filters on Row 4 on the "Master" sheet and exclude the following items below
Code:
Sub Test8()
Rows("4:4").Select
Selection.AutoFilter
ActiveSheet.Range("$A$4:$BB$15334").AutoFilter Field:=2, Criteria1:=Array( _
"0", "99999", "TOTAL ENERGY", "TOTAL EXPENSE", "TOTAL LABOR", _
"TOTAL LABOR & EXPENSE", "TOTAL START UP", "TOTAL VOLUME", "TOTAL WASTE"), _
Operator:=xlFilterValues
ActiveSheet.Range("$A$4:$BB$15334").AutoFilter Field:=7, Criteria1:="=G&A" _
, Operator:=xlOr, Criteria2:="="
ActiveSheet.Range("$A$4:$BB$15334").AutoFilter Field:=52, Criteria1:="-"
End Sub
With the remaining data, copy (starting from Row 5) Columns A, B and AM:AY and paste to the "UPLOAD TEMPLATE" worksheet that is already created starting in A6.
Last edited: