• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

VBA Excel Autofilter 3 Criteria

Sub SP120others()

    Sheets("receivables").Select

    ActiveSheet.ListObjects("Table_Query_from_SME_SQL3").Range.AutoFilter Field:= _
        9, Criteria1:="<>Name One", Operator:=xlAnd, Criteria2:="<>Name Two"
End Sub

==============================================================

Would someone know how to tweak the above code to show 3 Criterias instead? Thank you.
0
randybucao
Asked:
randybucao
1 Solution
 
wshark83Commented:
you mean something like this:

ActiveSheet.ListObjects("Table_Query_from_SME_SQL3").Range.AutoFilter Field:= _
        9, Criteria1:="<>Name One", Operator:=xlAnd, Criteria2:="<>Name Two",Operator:=xlAnd, Criteria3:="<>Name Three"
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now