LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Pivot Table Macro

Hi,

I have set up a macro which picks up some data from an
external database, prompts user for citeria and then
presents the data on a worksheet. It then creates a Pivot
Table using the data presented.

However, as the user can select different types of critera
(ie. Date range) the number of records can be different
each time. Therefore the data for the pivot table
increases or decreases. How can I code this to incorporate
the discrepancy? Currently I have this....

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
SourceData:= _
"'Raw Data'!R1C1:R9166C5").CreatePivotTable
TableDestination:="", TableName _
:="PivotTable1"

The "R1C1:R9166C5" means that only records up to Cell 9166
are read. The rest are ignored and not included in the
Pivot Table.

Can any one help?

Many thank

Bmistry
 
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 Macro Evil with a K[_2_] Excel Worksheet Functions 1 November 12th 09 07:34 PM
pivot table macro skippy51 New Users to Excel 2 May 14th 08 01:06 PM
MACRO FOR PIVOT TABLE anu Excel Discussion (Misc queries) 2 August 11th 06 05:07 PM
Macro and Pivot Table Prashanta Excel Programming 0 May 26th 04 12:40 PM
Steps from Macro recorder for Pivot table will not run as a Macro Nancy[_5_] Excel Programming 0 April 2nd 04 10:33 PM


All times are GMT +1. The time now is 08:54 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"