View Single Post
 
Old 07-22-2014, 08:15 AM
mbesspiata mbesspiata is offline Windows 7 64bit Office 2010 64bit
Advanced Beginner
 
Join Date: Mar 2011
Location: Virginia
Posts: 57
mbesspiata is on a distinguished road
Default Selecting/deselecting items in pivot table

I have a pivot table that begins with 145 vendor id numbers. I need to have the table end up only showing five vendor id numbers and their appropriate data.
I tried using the vba below to do this but it did not give me just the five. It still gave me all the numbers.
What do I need to do to get only the five listed in my vba below? I want the 139 others to not show up.

With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Vndr Id Cd")
On Error Resume Next
.PivotItems("2304013").Visible = True
.PivotItems("2706002").Visible = True
.PivotItems("2706003").Visible = True
.PivotItems("4601504").Visible = True
.PivotItems("5201064").Visible = True
On Error GoTo 0
End With


Mike
Reply With Quote