![]() |
Pivot Table
Hello,
I have two pivots tables with two fields of page (equal in the both tables) and I want change the fields of one pivot table and the other be refreshed automatically. It's possible?? Thanks! -- Cris |
Pivot Table
Hi,
I'm not sure what the two fields of page means but if it means 2 page fields, that has no baring on the problem. 1. If both pivot tables are created from the same data source then you can use the same cache for both and they will refresh together. 2. If they are not using the same data source/cache you can add the Refresh All button to the toolbar. Note this refreshes all pivottables and external data links (not spreadsheet cells that are linked to other files). This tool can be found by choosing View, Toolbars, Customize, Commands tab, Data category. 3. You can try code like this: Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable) On Error GoTo myErrorHandler Application.EnableEvents = False Set pvtTable2 = Worksheets("Manual Grouping").Range("E14").PivotTable Set pvtTable1 = Worksheets("Manual Grouping").Range("E1").PivotTable If Target.Name = "Test1" Then pvtTable2.RefreshTable ElseIf Target.Name = "Test2" Then pvtTable1.RefreshTable End If myErrorHandler: Application.EnableEvents = True End Sub where E1 and E14 are the top left corner of your pivot tables and you have named the pivot tables Test1 and Test2. -- Cheers, Shane Devenshire "Cristiano" wrote: Hello, I have two pivots tables with two fields of page (equal in the both tables) and I want change the fields of one pivot table and the other be refreshed automatically. It's possible?? Thanks! -- Cris |
Pivot Table
Hi
Debra Dalgleish has a downloadable file on her site which shows how to set this up. http://www.contextures.com/excelfiles.html#Pivot -- Regards Roger Govier "Cristiano" wrote in message ... Hello, I have two pivots tables with two fields of page (equal in the both tables) and I want change the fields of one pivot table and the other be refreshed automatically. It's possible?? Thanks! -- Cris |
All times are GMT +1. The time now is 12:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com