I need to get rid of rows of data where column D is not equal to SOM, MHT or ELP. My first pass was to filter for certain items in a different column, then select the range and delete those rows. That worked fine, but then more items got added and I hadn't filtered them. So, I need to be able to say filter everything except on a different column.
The below worked for my filter until I changed the criteria to a selection of items to exclude(<>). Do I have a syntax problem, or can I not do multiple exclusions like this?
The below worked for my filter until I changed the criteria to a selection of items to exclude(<>). Do I have a syntax problem, or can I not do multiple exclusions like this?
VBA Code:
Dim FilterRange As Long
FilterRange = Range("a" & Rows.Count).End(xlUp).Row
Range("A1").Select
ActiveCell.Offset(2, 0).Range("A1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$3:$L$" & FilterRange).AutoFilter Field:=4, Criteria1:=Array("<>MHT" _
, "<>SOM", "<>ELP"), Operator:=xlFilterValues