+ Reply to Thread
Results 1 to 4 of 4

Add multiple criteria to auto filter one by one via loop from a range / array

  1. #1
    Registered User
    Join Date
    03-26-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    75

    Add multiple criteria to auto filter one by one via loop from a range / array

    Hi All,

    I have a sheet where there are multiple comma separated values in a single cell. First of all I'm looking for a simple code to isolate the separate parts into a range / array.

    But that's the easy part (I'm sure I can find something on that online). However, once I have this range / array then I wish to loop through its values and add them as filter criteria.

    So for example, I have the following cell value: "Type 1, Type 2, Type 3"

    Then I want to filter the type column on these three values and exclude all other values.

    Does anyone know of an easy way to do this? Maybe even without the use of a range / array?

    Thanks!

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Add multiple criteria to auto filter one by one via loop from a range / array

    Try this:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    03-26-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    75

    Re: Add multiple criteria to auto filter one by one via loop from a range / array

    Thanks Olly! It works wonderfully!! I figured there would be an easier solution, I just never expect it to be THAT easy.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Add multiple criteria to auto filter one by one via loop from a range / array

    It's only easy when you know how

    Happy to help. If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Multiple criteria Auto Filter
    By igormigor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2015, 03:42 AM
  2. [SOLVED] Loop through Auto Filter Criteria and Copy Formula Results Into New Sheet
    By hamidxa in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-21-2014, 05:34 PM
  3. VBA Code for Multiple criteria auto Filter & sending the mails based on that
    By Rajveer1981 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-09-2012, 01:37 PM
  4. VBA to loop filter criteria from cell range
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 09-24-2012, 04:57 AM
  5. Multiple Criteria Using Auto Filter
    By mattydalton in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-06-2010, 02:11 PM
  6. Auto Data Range AND Filter Criteria
    By RichardBerry in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-17-2007, 07:44 AM
  7. Auto Filter Delete Rows by Criteria Doesn't Work Range To Complicated
    By robertjtucker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2005, 01:05 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