+ Reply to Thread
Results 1 to 4 of 4

Need to filter pivot on multiple items defined in range on separate worksheet

  1. #1
    Registered User
    Join Date
    08-16-2013
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    16

    Need to filter pivot on multiple items defined in range on separate worksheet

    Hello

    I have a pivot table with client name, volume, product and dates. Something like the below

    Client Name: ABC capital

    Sum of TRADES Column Labels
    Row Labels Bond CDS Indices IRS

    2012
    Aug 3 1 29
    Sep 9 1 27
    Oct 53 3 7
    Nov 56 3 78
    Dec 59 3 21

    on a separate worksheet i have a list of products defined in a range - "product". this list changes depending on the selection made by the user from a drop down list. what i need is that depending on the values within this range the pivot table filters the products. Can someone please provide the vba code or point me in the right direction? I attach a sample file

    Thanks!
    Attached Files Attached Files
    Last edited by Nmarkit; 08-29-2013 at 10:12 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,983

    Re: Need to filter pivot on multiple items defined in range on separate worksheet

    A simple way would be to add a formula column to the source data:
    =ISNUMBER(MATCH(F2,product,0))

    and then add that field to the pivot filtering for True. Then all you need to do is refresh the pivot when the criteria change.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    08-16-2013
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Need to filter pivot on multiple items defined in range on separate worksheet

    Thanks for your quick response Rory.

    however what i'm looking for is to have the pivot update dynamically. so when the user selects certain products from the filter (listbox) the pivot gets updated to those products. i don;t want to manually refresh the pivot each time. i'm using vba for my report and so far have been able to pull through the selected products from the filter and dump it in the product range. now am stuck on how to update the pivot on this range....

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,983

    Re: Need to filter pivot on multiple items defined in range on separate worksheet

    If you use the formula, then your code simply needs one more line to refresh the pivot table after updating the product list.

+ 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. Replies: 1
    Last Post: 08-29-2013, 01:55 PM
  2. Disable "Select Multiple Items" in a Pivot Filter
    By FixandFoxi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-09-2013, 06:19 AM
  3. One filter/ Master filter multiple pivot tables based on worksheet...
    By jlworden in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-10-2013, 11:16 AM
  4. Replies: 4
    Last Post: 10-10-2012, 03:38 PM
  5. Change Pivot table Filter Based on Cell Value *Multiple Filter items* Possible?
    By Flydd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2012, 06:57 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