Linking Pivot tables?!?!?

jen_a_scott

New Member
Joined
May 4, 2011
Messages
4
Hi,

Does anyone know how I can link or appear to link 2 Pivot tables? I have two different lots of data coming through from SQL into 2 pivot tables but I need them to appear as one. The are a few common fields I can use to link but I can't see a way to do it. I have also briefly seen that there is a VBScript that says whatever action is done in the first pivot table will happen in the second... Does anyone know what this is?:confused::confused:

Any help would be greatly received as I've hit a wall.

THANKS!!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi,

I've tried the below

Private Sub Worksheet_Calculate()
Dim PF1 As PivotField
Dim PF2 As PivotField
Dim x As String
Application.EnableEvents = False
Application.ScreenUpdating = False
Set PF1 = ActiveSheet.PivotTables("PivotTable1").PageFields(1)
Set PF2 = ActiveSheet.PivotTables("PivotTable2").PageFields(1)
x = PF1.CurrentPage
PF2.CurrentPage = x
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub


but get error 1004. I'm using the row heading as the fields:confused:

Is there a way to have this to cover just all row labels?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

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