My problem is that I want to filter out a specific value in different column of sheet, I tried record macro but the record feature seems to only support selecting specific values to keep instead of take out.
For example, if the column is filled with weekly data’s which is not known beforehand, I want to make sure a specific category is not in there. If a sheet was filled weekly data, with columns headings like Company, Product, Id,Date of manufacturing, manager name and all .
From the column for company i want to take out "ABC company" ,”FAST ltd”,”WIN Company” without having to know the name of other companies in list. Also I want to take out some products like “computer”,’phone”,” laptop”,” sim”. The record feature in macro only seems to say what to keep, not what to take away . I would have to select every company except the 3 companies which I want to filter out.
Please help me to get the code for VBA for filter out using multiple criteria.
I've tried this code
ActiveSheet.Range("$A$1:$G$24").AutoFilter Field:=2, Criteria1:="<>ABC ccompany", _
Operator:=xlAnd, Criteria2:="<>WIN company", Operator:=xlAnd, Criteria3:="<>FAST ltd"
But I am getting "run time error 1004".I think Criteria method allows only two criteria at a time.
Any help would be great.