Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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").PivotF ields("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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check out this link...
http://www.contextures.com/excelfiles.html#Pivot There are a number of different files here depending on exactly what you are trying to do... -- HTH... Jim Thomlinson "Rammy" wrote: 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").PivotF ields("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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. "Jim Thomlinson" wrote: Check out this link... http://www.contextures.com/excelfiles.html#Pivot There are a number of different files here depending on exactly what you are trying to do... -- HTH... Jim Thomlinson "Rammy" wrote: 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").PivotF ields("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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Question regarding pivot table selections | Excel Discussion (Misc queries) | |||
Pivot Table Page Area selections in a macro | Excel Programming | |||
Pivot Table Linking | Excel Discussion (Misc queries) | |||
Pivot Table Selections | Excel Programming | |||
How do I get "multiple selections" displayed in Pivot Table Field | Setting up and Configuration of Excel |