+ Reply to Thread
Results 1 to 5 of 5

Filter Pivot From List

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Filter Pivot From List

    I have a pivot created by another team, using remote source data. For each member of my team I need to run a series of macros to configure the pivot the way they need it. Each member has 3 to 12 different DeptIDs, and each DeptID has 20 to 50 Programs (PACs).

    There is no "Member" field in the pivot, only DeptID and PAC to limit the data. So, in my workbook I have a sheet ("DivPAC") listing each member in column 1, with their DeptIDs in column 2 and PACs in column 3, as shown in the picture.

    My team members select their name at the start of the process. What I'm trying to figure out is how, during my manipulation of my pivot, I can use the name they input to filter my pivot to their data. I'm looking online but not having much luck, so would appreciate any help you can provide.
    Attached Images Attached Images

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Filter Pivot From List

    Attach a sample workbook and we should be able to help you out. If you are familiar at all with VBA, it is a matter of printing the name into the pivot table filter if it is a single select. Multiselect values are a bit more complicated.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Filter Pivot From List

    I'm pretty familiar with VBA. I've attached two sample files:
    "My Macro Workbook" is to represent the workbook my team is working from (where the Macros reside). The "DivPAC" is one tab in the actual workbook, and tells what Dept Id and PAC each member is responsible for.

    "The Pivot Table" workbook represents the pivot table as it exists when I first come in to it. The original workbook consists only of the pivot which is created by another team from an external database I can't access directly. The amount of Data in the pivot is HUGE, so double-clicking to get to the source data and starting from there isn't a very realistic option. I've included a sheet showing the Pivot Field List in case that helps.

    All I need help with is the actual part of whittling the data down to the individual Budget Analyst, and of course the "Budget Analyst" field isn't part of the Pivot data, so I have to get it by DeptID and PACs. As an FYI, a DeptID may be handled by multiple analysts, and a PAC may exist in multiple DeptID, but each DeptID/PAC combo is unique to one analyst. Representative code is shown below.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Filter Pivot From List

    I think this is doable. I'll get to when I've beaten down the flames here to smoldering embers.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Filter Pivot From List

    I think I've got it. Code below filters according to my ranges.
    Please Login or Register  to view this content.
    I can also replace ""G6:G12" with my namedRange "DebbieDiv", like this:
    Please Login or Register  to view this content.
    . So the gets me closer to using the Analyst Name to filter the pivot. I already capture the first name of my analyst and define it as USER, so can use code like
    Please Login or Register  to view this content.
    That seems to be working for me so far.

    So, all I need to do is create named ranges for each Analyst, and I should be golden. If you think of a better way I'm all open to that.

+ 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. Macro to filter a pivot whilst looping through filter criteria in a variable list.
    By Alistairm88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2015, 04:25 AM
  2. Get list of filtered values from pivot filter
    By mateoc15 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2015, 10:21 AM
  3. Label Filter Pivot Results by Defined List
    By scottyedmonds in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-28-2014, 12:20 PM
  4. [SOLVED] Use A Custom List of Values To Filter Pivot Table
    By dollylectric in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-29-2013, 01:05 PM
  5. [SOLVED] Filter a pivot table by list in a range
    By MikeWard100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2012, 07:31 PM
  6. Customize Filter List in Pivot Tables
    By kstrait@gmail.com in forum Excel General
    Replies: 0
    Last Post: 08-09-2006, 12:10 AM
  7. Customize Filter List in Pivot Tables
    By kstrait@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2006, 12:10 AM

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