Results 1 to 2 of 2

Pivot Table-Select Pivot Items

Threaded View

jomili Pivot Table-Select Pivot Items 07-28-2011, 01:16 PM
jomili Re: Pivot Table-Select Pivot... 07-28-2011, 01:20 PM
  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,054

    Pivot Table-Select Pivot Items

    I've got code I've been using for a while to select my Strategies in a pivot table. Now it's not working correctly. No error message, but it's only selecting B.1.1, not B.1.2. I can't find anything in the formatting of B.1.1 and B.1.2 that's causing a problem. I've attached a sample of my pivot. Any help on this is greatly appreciated.

    Dim Pt As PivotTable, Pi As PivotItem, Pf As PivotField
    Set Pt = ActiveSheet.PivotTables("PivotTable1")
    
    'Change the pivot table to only give us the info we need
            With Pt.PivotFields("FY 10-11 STRATEGY")
                For Each Pi In Pt.PivotFields("FY 10-11 STRATEGY").PivotItems
                    If Pi = "B.1.1" Or pvtItem = "B.1.2" Then
                        Pi.Visible = True
                    Else
                        Pi.Visible = False
                    End If
                Next
            End With
    Attached Files Attached Files
    Last edited by jomili; 07-28-2011 at 01:20 PM.

Thread Information

Users Browsing this Thread

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

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