+ Reply to Thread
Results 1 to 2 of 2

AutoFilter a table with an array as criteria

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    AutoFilter a table with an array as criteria

    This will get worse in the next step, but as I can't even master the basic when I reduced my problem to basics I will start here...

    Please Login or Register  to view this content.
    Is definitely not working for me. Each array element resolved fine in the Immediate window, so the array is proven good.

    I am here because I went out, did searches, read what was written and by several examples the above is supposed to work unless I copied something wrong. When all else fails I go as basic as I can and build up. When I gave Criteria1 a given single value, say "Present" it worked fine.

    I also tried:
    Worksheets("Directory").ListObjects("tblDirectory").Range.AutoFilter field:=2, Criteria1:=Array("Present", "Absent"), Operator:=xlFilterValues

    and as always got my error 1004.

    I now suspect I am missing something obvious as I am getting a bit frustrated. Can someone point out what I am missing so I can make the basic work and then go on to the next issue?

    Many Thanks!!!

  2. #2
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Re: AutoFilter a table with an array as criteria

    Well, so far I know something is not right in my project as I am experimenting with a new workbook with nothing else in it and am able to get things done such as the filter on the two named element array that I could not in the major project, so please hold off until I am able to further isolate my problem-

    edit- My problem is nothing short of my computer being possessed and in need of an exorcism.
    Absolutely no idea what is going on. Tried the experimental code from the bare workbook in the main project and it worked. Un-commented out the lines of the code that was not working and they worked. I am a worthless target if someone simply wanted to mess with me, and I employ a number of anti-malware layers, so it's got to be demonic possession.

    I apologize for taking your time-

    Now I can post the real brain-teaser...
    Last edited by brucemc777; 10-28-2016 at 06:52 PM.

+ 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. AutoFilter Get Criteria Array
    By alexbeatle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-13-2014, 09:45 AM
  2. Autofilter Array Criteria
    By weeeee0713 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2014, 03:45 AM
  3. Using an array as criteria in an AutoFilter
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2014, 10:15 AM
  4. [SOLVED] AutoFilter: Array as Criteria
    By Klaster in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-10-2014, 06:36 PM
  5. [SOLVED] Using an array from a range for Autofilter Criteria
    By J-Tin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 10:49 AM
  6. AutoFilter Multiple Criteria Array
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2013, 04:33 AM

Tags for this Thread

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