+ Reply to Thread
Results 1 to 6 of 6

VBA for Autofilter w/Multiple Criteria

  1. #1
    Registered User
    Join Date
    03-11-2019
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    8

    VBA for Autofilter w/Multiple Criteria

    Hello,
    I am trying to set up an autofilter but I have three criteria;
    Jan-1-2019
    Apr-1-2019
    BLANK CELLS

    So I have tried

    Please Login or Register  to view this content.
    But it seems to only do the <=Apr-1-2019 and BLANKS but it ignored the first part of the array. Can anyone help me with this line of code.

  2. #2
    Registered User
    Join Date
    03-11-2019
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    8

    Re: VBA for Autofilter w/Multiple Criteria

    bumpppp still looking for help on this one

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: VBA for Autofilter w/Multiple Criteria

    Can you attach an EXCEL file, this help to undertsand and debug ...!
    - Battle without fear gives no glory - Just try

  4. #4
    Registered User
    Join Date
    03-11-2019
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    8

    Re: VBA for Autofilter w/Multiple Criteria

    Okay well I will upload an example with 100 random dates. So if my VBA code is

    Please Login or Register  to view this content.
    I want to filter out the dates for dates >= Jan-1-2019 and <= Apr-1-2019 and include any that are blank.
    Attached Files Attached Files
    Last edited by viettest; 04-24-2019 at 02:45 PM.

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: VBA for Autofilter w/Multiple Criteria

    Were you able to dit manually ???
    So far not for me !!!

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,027

    Re: VBA for Autofilter w/Multiple Criteria

    Make use of a helper column C
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

+ 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] How to set autofilter in VBA using multiple criteria
    By doleenovodno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2018, 02:51 PM
  2. [SOLVED] Autofilter multiple criteria
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2017, 10:24 AM
  3. Using VBA to AutoFilter Multiple Criteria
    By k9care in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2014, 05:59 AM
  4. Autofilter multiple columns with multiple string criteria
    By svalentine91 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-23-2013, 11:26 AM
  5. VBA Autofilter multiple criteria
    By Daduka in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2013, 08:36 AM
  6. [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
  7. 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

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