Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot table - unwanted lines
I recorded a pivot table and have code like this in it. However, each day I
run it against a different file and the Pivot Items are different. 1st day With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Problem") .PivotItems("Upgrade").Visible = False .PivotItems("Slow Speed").Visible = False .PivotItems("Cannot Create Customer Account").Visible = False 2nd day With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Problem") .PivotItems("Out of Service").Visible = False .PivotItems("Slow Speed").Visible = False .PivotItems("Account Disabled").Visible = False The macro aborts any time an entry is not there (Upgrade) and again when there is a new entry (Out of Service) So how do you create a pivot table that will run no matter what the data is? This is the lines after the above. End With With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Problem") .PivotItems("(blank)").Visible = False End With With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Cluster") .Orientation = xlRowField .Position = 2 End With With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Diagnosis") .Orientation = xlRowField .Position = 3 End With ActiveSheet.PivotTables("PivotTable5").PivotFields ("Cluster").Orientation = _ xlHidden Any help would be appreciated. Thanks, Ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Filter lines with Pivot table and non pivot table columns | Charts and Charting in Excel | |||
suppress unwanted rows in a Pivot Table using VBA, dropdowns & Vlo | Excel Programming | |||
A calculated item gives unwanted changes to my pivot table | Excel Discussion (Misc queries) | |||
How to remove unwanted green horizontal lines in Word Table? | Excel Worksheet Functions | |||
Unwanted Total in Pivot Table row field | Excel Programming |