Solved

VBA Excel Autofilter 3 Criteria

Posted on 2012-04-04
1
348 Views
Last Modified: 2012-08-29
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
Comment
Question by:randybucao
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
wshark83 earned 500 total points
ID: 37811694
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
using vb script 5 52
Formula fix for vlookup and iserror 3 28
Excel formula that pulls back the id 4 42
split data by day 21 35
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question