Results 1 to 4 of 4

Handling pivot tables with macros - Filtering fields

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Question Handling pivot tables with macros - Filtering fields

    Hello!
    How can I filter items from a certain field of a Pivot Table without having to use something like
    With ActiveSheet.PivotTables("Table1").PivotFields("Field1")
            .PivotItems("Item1").Visible = False
            .PivotItems("Item2").Visible = False
            .PivotItems("Item3").Visible = False
            .PivotItems("Item4").Visible = False
            .PivotItems("Item5").Visible = False
                            .
                            .
                            .
                            .
                            .
                            .
            .PivotItems("ItemN").Visible = False
    End With
    where every item has to be turned off one by one? Is it possible to hide them all and then use visible.true to show only the item I want to see? Keep in mind that the items names aren't as simple as shown in the code, so using a changing string to call each name inside a loop isn't possible.
    Thanks in advance
    Last edited by Pichingualas; 02-10-2012 at 12:33 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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