+ Reply to Thread
Results 1 to 2 of 2

AutoFilter for multiple criteria and blank cells

  1. #1
    Registered User
    Join Date
    10-01-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    AutoFilter for multiple criteria and blank cells

    Hi Guys,

    I'm trying to autofilter some data though a macro with multiple criteria, one of which is to filter out the blank cells.

    My code is:

    rWB.Sheets(1).Range("$A$1:$AC$37803").AutoFilter field:=9, Criteria1:=Array("<>FLY", "<>TVL", "<>"), Operator:=xlOr

    It seems to only filter out the blanks though. I'm still getting FLY and TVL rows???

    What am I doing wrong? Thanks in advance!

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: AutoFilter for multiple criteria and blank cells

    What am I doing wrong?
    I don’t think you are doing anything wrong. I believe this is an Excel limitation for autofilter.

    Using a set up like this I can “get rid of” two components but not three or more.

    Please Login or Register  to view this content.
    Using an Array “construction” I can select a number of components i.e.

    Please Login or Register  to view this content.
    will select "FLY", "TVL" and blank values. So you could either use an array to select all other values in your data excluding "FLY", "TVL" and blanks or you could let your macro check the values of all rows and hide those that contain "FLY", "TVL" or a blank value. Depending on how much data you have got that may take a bit of time.

    As I'm not an expert on autofilter hopefully other forum members can suggest a better solution.

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] CountIFS with multiple criteria to ignor blank cells
    By dbaker4020 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2013, 09:03 AM
  2. [SOLVED] Autofilter with multiple criteria - how to ignore blank criteria
    By MOONDRIFT47 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2012, 12:20 PM
  3. [SOLVED] Can Autofilter Ignore Blank Criteria?
    By RogueArchon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2012, 01:20 PM
  4. Multiple Criteria for Autofilter using And & Or
    By Wongadob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2011, 01:39 PM
  5. multiple column , multiple criteria autofilter sort
    By jseufert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2009, 06:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1