PivotTable/Chart Filter on Click
I have a macro that creates a PivotTable and PivotChart and moves the
PivotChart to the Summary sheet. I would like to be able to click on a hyperlink on the Summary sheet that would filter the column field on the PivotTable on the Tables sheet, which would update the chart on the Summary sheet. For instance, if the chart user clicks on Medical Supplies, the column field filter would clear everything except medical supplies. I know the code to filter would look like this. Sheets(€śTables€ť).Select With ActiveSheet.PivotTables("PivotTable4").PivotFields ("Description") .PivotItems("Sub-total M&O").Visible = False .PivotItems("Drugs").Visible = False .PivotItems("Sub Contracts").Visible = False .PivotItems("Consumable Supplies").Visible = False End With I just need to know how to set it up so that the PivotItems will change on a click. Maybe I need to set it up as an event, but I am not sure. Your help is very much appreciated. |
All times are GMT +1. The time now is 03:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com