Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default How To: Check pivot table data source.

Hi TWIMC,

I need to be able to check each pivot table to ensure that each pivot table
is using the same source data so that my workbook flie is a small as possible.

If the pivot table report is not using the same source, then change it
accordingly.

Something like,

For Each ws In wbk.Worksheets
For Each pt In ws.PivotTables
pt.SourceData = "DATA!R1C1:" &
wsData.Cells.SpecialCells(xlCellTypeLastCell).Addr ess(ReferenceStyle:=xlR1C1)
pt.RefreshTable
pt.PivotCache.MissingItemsLimit = xlMissingItemsNone
pt.PivotCache.Refresh

For Each pfd In pt.PageFields
For Each rge In pt.PageRangeCells
If pfd.Name = ws.Cells(rge.Row, rge.Column).Value And
ws.Cells(rge.Row, rge.Column - 1).Value < "" Then
pfd.CurrentPage = ws.Cells(rge.Row, rge.Column - 1).Value
End If
Next rge
Next pfd
Next pt
Next ws

But does this way keep my file as small as possible, it with reference to
the message that you get when you create a second pivit report but base it on
the same data range as the first pivot report, Excel prompt you to select the
first pivot table as the data source to save of memory and file space.

TIA
KM
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 Data Source Nate Excel Discussion (Misc queries) 2 March 5th 09 03:19 PM
How to check Pivot Table source? Marcin Peciak New Users to Excel 2 January 25th 09 10:24 PM
How can I check/verify data in my Data Source for Pivot table? gayleh Excel Worksheet Functions 1 April 16th 08 08:30 PM
Pivot table source data Russ Excel Discussion (Misc queries) 0 November 9th 07 04:37 PM
Pivot Table data source "data source contains no visible tables" Jane Excel Worksheet Functions 0 September 29th 05 08:28 PM


All times are GMT +1. The time now is 03:38 AM.

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

About Us

"It's about Microsoft Excel"