+ Reply to Thread
Results 1 to 2 of 2

Filter Pivot Table for multiple values

  1. #1
    Registered User
    Join Date
    09-03-2020
    Location
    Texas, USA
    MS-Off Ver
    Windows 10
    Posts
    1

    Filter Pivot Table for multiple values

    1. I have a sample dataset attached with 3 columns - Plants, Date and Sales

    2. There is a pivot table created that filters on Plant and Date

    3. The user will specify the plant name and the start and end date

    4. The pivot table will be filtered for that specific plant and the time interval between the start and end date as seen in the image attached

    5. The user will have the option to select TWO plants. In the attached image we have Plant B in Cell J5 but the user has the option to also write Plant A in K5. So the code must be flexible if either one plant or two plants have been selected.

    6. The max and min date automatically checks to ensure the start and end date is within bounds

    All of this needs to be in a VBA script.

    This is just one tab but in the file there will be atleast 10 tabs with 2 Pivot tables each. So the vba script must include a function that does all the tasks and at the very least take the pivot table as its argument.

    Help - Does anyone have any advice/code that can do this? I have spent days trying to build this and looking online and theres always some kind of constraint. Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: Filter Pivot Table for multiple values

    Hi and welcome to Excel Forum.

    I changed the structure of the filters a bit. In cells I6, I7 and below, you could put 1, 2 or more plants.

    This is the macro.

    Please Login or Register  to view this content.
    The file:
    Attached Files Attached Files

+ 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. Pivot Table Label filter - Multiple values
    By kimi01 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-13-2020, 06:17 PM
  2. pivot table filter multiple values
    By korenje in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2018, 08:44 AM
  3. [SOLVED] Using VBA to update pivot table filter from multiple values in a list
    By tyler0320 in forum Excel General
    Replies: 7
    Last Post: 04-09-2018, 03:49 PM
  4. Replies: 8
    Last Post: 06-24-2014, 03:35 PM
  5. Filter A Pivot Table Multiple Times Based On Values In List In Another Sheet
    By w.m.christensen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2013, 03:55 AM
  6. filter pivot table with multiple values?
    By hamsup1o in forum Excel General
    Replies: 0
    Last Post: 09-29-2009, 04:08 PM
  7. [SOLVED] Pivot table page filter not accepting multiple values. Workaround?
    By jco in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2005, 05:05 PM

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