user3029217
user3029217

Reputation: 45

Is it possible to filter a cell in Excel using several criteria VBA

I was wondering if it is possible to filter on a cell in VBA using more than 2 criteria?

ActiveSheet.Range("$A$1:$R$" & NumberOfLines).AutoFilter Field:=1, Criteria1:="=*PSO*", Operator:=xlOr, Criteria2:="=*NSM*"...

If it's not possible, is there a way to filter a cell using several criteria?

Upvotes: 0

Views: 66

Answers (1)

Nathan_Sav
Nathan_Sav

Reputation: 8531

Using an array, for example, Criteria1:=Array("2","3", "5")

Upvotes: 2

Related Questions