Setting values in a Pivot Table Filter Drop down the same as another Pivot Table Filter Drop list

TrishMitra

New Member
Joined
Jul 29, 2017
Messages
2
I have two Pivot tables Pivot1 and Pivot2 on Sheet1. Both have the same data source so same data.

In the Pivot table field list, in Filters there is one filter called Year. This is a list of years (2001,2002,...2017). Both tables have Year as a filter. On the dropdown filter list Select Multiple Items is checked so the user may select more than one year if he wishes.

On PivotTableUpdate I would like the following: when the user selects one or more years in Pivot1 Year filter, then in Pivot 2 Year filter those values should automatically be selected.

I managed to do this when the user selects 1 year only by
getting the value of Worksheets("Sheet1").PivotTables("Pivot1").PivotFields("Year").CurrentPage
and setting the values of Worksheets("Sheet1").PivotTables("Pivot2").PivotFields("Year").CurrentPage.

However after much trying am not sure what to do if the user selects multiple values of Year in Pivot1. Would be grateful for some help. Thanks. I haven't done any programming for 12 years now and am a little rusty
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,214,967
Messages
6,122,503
Members
449,090
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top