+ Reply to Thread
Results 1 to 2 of 2

Selected pivot table filter items are not visible to VBA

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

    Selected pivot table filter items are not visible to VBA

    The attached workbook has a pivot table with three fields on which I would like to filter and sync with other pivot tables. I got that part working. What is happening is that VBA thinks that all the visible values for two of the filters are FALSE, so my sync program fails when it tries to turn everything off. I commented out my filter reset program and wrote a simple test program.

    This function (GetFilteredValues) creates a string of the visible values for a field in the pivot table. For example, if I have item 1 and item 3 selected, it should produce a string "item 1:item 2".

    I use this program to look at three filters: Sales Agent, Department and Location.

    Sales agent works as advertised. It shows exactly the number of sales agents I select. Department and location do not work. It shows that none of the items I can see in the pivot table filter and the slicer are selected in the filter, which of course is impossible.

    As presented, all items in these three filtered are selected so I should get the "full string" of values for each of the three filters. Department and Location still fail.
    Attached Files Attached Files
    Last edited by dflak; 02-22-2018 at 01:18 PM.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

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

    Re: Selected pivot table filter items are not visible to VBA

    P.S. Additional testing reveals another "twist." The department and locations only fail if all the items are visible. If you select a subset of either of these filters then the filter for that item works.

+ 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] Rank items in Pivot table from high to low and low to high based on the filter selected
    By jholiday78 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 02-19-2017, 11:22 AM
  2. Pivot table not showing the selected items when filter added
    By ShaliniGomes in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-23-2014, 01:44 AM
  3. Show Multiple Items Selected in Pivot Filter
    By cp41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2014, 06:20 AM
  4. Return a value for items selected in a pivot filter
    By BaxBax in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 11-29-2013, 09:12 AM
  5. Replies: 1
    Last Post: 09-03-2012, 10:03 PM
  6. [SOLVED] Unable to set the visible items of the Pivot Table
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2012, 03:09 PM
  7. Pivot table.... list of visible items
    By ericlch16 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2007, 01:50 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