Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Pivot Table Question

On Wednesday, September 12, 2012 4:51:25 PM UTC-4, (unknown) wrote:
Hi, Assuming that the data feeding your PivotTable has been formatted as a Table called "Table1", you can paste this code to the module for the "Data" sheet (right-click the tab name and click "View Code"). This sub will only fire when you leave the data tab, so if you enter a bunch of data on the Data tab and then click the Table1 tab, this event will fire. If you don't have your data formatted as a table, then comment out that line and uncomment the line below to use currentregion (works best if no blank rows/columns in data). Hope this helps, Ben Code: Private Sub Worksheet_Deactivate() With Sheets("Table1").PivotTables(1) .SourceData = "Table1[#All]" 'Or uncomment next line if not formatted as a table '.SourceData = "Data!" & Sheets("Data").Range("A1").CurrentRegion.Address(, , xlR1C1) .PivotCache.Refresh End With End Sub


Thank you very much. That workded well.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Question debinnj Excel Discussion (Misc queries) 0 June 18th 08 09:06 PM
Pivot Table Question: SubTotals for 2 of 4 Pivot Tables in same worksheet [email protected] Excel Programming 0 December 19th 06 05:13 PM
Pivot Table question erick-flores Excel Discussion (Misc queries) 6 November 17th 06 10:39 PM
Pivot Table Question : If statment in Pivot Table?? seve Excel Discussion (Misc queries) 2 November 22nd 05 01:00 AM
Pivot Table Question [email protected] Excel Programming 1 December 12th 03 08:11 AM


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"