Help with a VBA code for filter multiple pivot tables across multiple sheets by a value in a cell

Occasional Contributor



I am new to VBA and still getting my head around the language. I have tried searching the internet but I am not able to find a macro that will help my situation. 


I am trying to build a dashboard in excel. The summary of the data will be showcased across multiple sheets and therefore I require a macro to be able to apply filter across multiple pivot tables. To simply explain in an example, I have a data validation list in Sheet 1 & 2 in cell A1. At the moment using this Macro  I have been able to ensure that regardless whether the value is selected in Sheet 1 or 2 both A1 cells will match each other. However, here is where I get stuck, I have tried to use worksheet even handler 'Change' in Sheet 1 A1 but then when I go to Sheet 2 A1 and select the a value from the drop down list it fails. Although the cell value in Sheet1 A1 changes the macro in Sheet1 does not trigger.


So in summary, is it possible to for a macro to be executed when a cell in an inactive sheet changes within the same workbook changes?


Please advise

0 Replies