linking pivot table selections

R

Rammy

Using Excel 2007. I have two (or more) pivot tables that I want to be able to
link the selections made in one to another. I have the following code

Sub test()
Sheets("Sheet1").Select

Application.ScreenUpdating = False
Application.DisplayAlerts = False

Dim SPgField1 As String
Range("b1").Select
SPgField1 = Selection
Sheets("Sheet1").PivotTables("PivotTable2").PivotFields("Field
1").CurrentPage = SPgField1

End Sub

The pivots are on sheet1
The 1st pivot table has 1 selection Field1.
The above code works if i am only making a single selection
However I need to be able to do multiple selections.
When this is done in the field b1 it shows the value Multiple Selections
This gets copied into the field1 on pivot table 2 - and overwrites the first
value of the selection list with Multiple Values. But doesnt do the correct
values

Any ideas much appreciated
 
R

Rammy

Jim
Thanks for that. There was an example for linking selections on pivots - but
it doesnt work when making multiple value selections within on selection item.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top