synchronize two pivot table

S

shiro

I have two pivot table on a worksheet,I want to
synchronize the page between them both.I mean,
if user select page A in the first pivot table,auto
matically the page selected on the second pivot
table is A too.Is it possible?
Hope somebody like to pint me to the right direction.
Thank's in advance.

Rgds,

Shiro
 
S

Sandy Mann

I don't know if this is what you want but assuming that the first table is
in Sheet 1 A1:G20 and the second one is in Sheet 2 then in the Sheet Module
of sheet 1 enter:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Intersect(Target, Range("A1:G20")) Is Nothing Then Exit Sub
Here = Target.Address
Call SelectIt(Here)
End Sub

and then in a General Module:

Sub SelectIt(Here)
Application.ScreenUpdating = False
Sheets("Sheet2").Activate
Range(Here).Select
Sheets("Sheet1").Activate
Application.ScreenUpdating = True
End Sub

If you want to immediately go to Sheet 2 then in the General Module use:

Sub SelectIt(Here)
Application.ScreenUpdating = False
Sheets("Sheet2").Activate
Range(Here).Select
Beep
Application.ScreenUpdating = True
End Sub

The Beep is just to alert you that the sheet has changed.


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

shiro

Hi Sandy,
I did what you suggested but it seems can't work.
These two pivot table won't change to selected page
as in another pivot table.Any other idea?
 
S

Sandy Mann

Thanks for jumping in with that Roger, (while I was still scratching my head
<g>). It is a far better answer than I could ever have given.


--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

shiro

The code from Debra can't not work in my workbook.

Is there any something wrong?I just modified the sheet's

name to my worksheet's name in the code,is there any other

things need to be modified or pay attention for?



 

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