Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot Table Macro (Show Hide)
Hi everybody,
I have pivot table with about 150 rows in each representing a course at a college. I want to be able to show 1 of 3 faculties (arts, humanities, Sciences) at the click of a button. I tried recording a macro of me showing only the relevant courses, but it only works on the sheet i recorded it on. I want it to be generic so it will work on the active sheet. (there are 14 sheets in total) So how would i make something like this work on any sheet (the PivotFields("Courses") are the same throughout the workbook) Sub tbArts() With ActiveSheet.PivotTables("PivotTable11").PivotField s("Courses") .PivotItems("Biology (Salters)").Visible = False .PivotItems("Business & Finance (Applied)").Visible = False .PivotItems("Business & Finance (VCE)").Visible = False End With End Sub Ive tried clutching at straws using things like: With ActiveSheet.PivotTables.PivotFields("Courses") With ActiveSheet.PivotTable.PivotFields("Courses") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Table - Disable the Show/Hide Detail upon refresh | Excel Discussion (Misc queries) | |||
Looking for gurus that knows show and hide functions on a pivot table? | Excel Worksheet Functions | |||
Pivot table Data area show/hide behavior | Excel Discussion (Misc queries) | |||
How to show/hide range of Month on Pivot Table | Excel Discussion (Misc queries) | |||
pivot table - hide details but show subtotal for calculated field | Excel Discussion (Misc queries) |