Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Creating multiple pivot table report at run time

Hi,

I'm trying to automate the creation of a report through VBA and desperately
need some help.

I have a named range 'Countries' on sheet 1.

On sheet 2 there is loads and loads of data related to each country and
various cities within each country. The number of cities varies per country
and the list of countries will change each time this report is run (source
data will change).

On sheet 3:
A - rows 1 to 10 are static
B - rows 11 to 26 are formulaic and lookup bits of information for country 1
C - row 27 is the top of a PivotTable1 extracting data for cities in country
1 (varies in record count depending on what country 1 is - the data set
changes each time this is done)

To create the report:
1. PivotTable1 page field is set to country 1 (the top row of the
'Countries' named range)
2. Rows 11 to the bottom of PivotTable1 (which varies) are copied to the
clipboard
3. 2 rows below the bottom of PivotTable1 (in column A), the cell is
selected and clipboard pasted
4. In this new pivot table that has been pasted, the page field is set to
the second country in the 'Countries' list
5. The above steps are repeated until the full list of countries has had its
formulas and pivot table pasted.

I'm really struggling with the code here to reference the right rows to copy
and where to paste . Can somebody please give me some tips or example helper
code please?

Many thanks,

Basil
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
how to drag multiple items to pivot table report at once maluash Excel Discussion (Misc queries) 0 May 10th 10 08:31 PM
creating a report from a table, pivot table not suitable UKMAN Excel Worksheet Functions 1 April 16th 10 08:35 AM
FRom Pivot table select multiple items under report filter AJ Excel Programming 0 May 29th 09 04:53 PM
Creating Multiple Charts from Same Pivot Table using macro KenY Excel Programming 5 April 23rd 07 05:18 PM
How do I use multiple worksheets (List) in a Pivot Table Report? Robert Excel Worksheet Functions 1 December 2nd 04 04:16 PM


All times are GMT +1. The time now is 05:43 PM.

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"