I currently have an excel table which I want to filter with 2 Criteria simultaneously.
I want the table to be presented with a ">=" Criteria and with a "<>" Criteria in the same filed.
Since the table is big I want to limit the rows to be shown (Criteria ">=") and, on the other hand, to give the blank cells of the same filed as input (Criteria "<>").
The code I wrote follows:
Sub Filter()
Dim tbl As ListObject
Set tbl = ActiveSheet.ListObjects("PiPeLine_Table")
tbl.AutoFilter.ShowAllData
tbl.Range.AutoFilter Field:=7, Criteria1:=">=202100000", Operator:=xlAnd, Criteria2:="<>"
End Sub
Though my table shows like just the Criteria1 had been applied:
Field 7 represents the colored column.
Last cell with value is the one shown (202200205).
After this cell should the blank cells show.
Pretty sure I'm doing a basic mistake or missing something really basic but can't figure out what it is.
Hope some of you can help me out.
Rafa
