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: 8
Default Pivot Table: Complex printing issue????

Hello Everyone

I have a pivot table that uses two page fields. I have written the code to automatically cycle through the page field items and print each on separate pages(code below, AND THANKS to several of you who helped me!). I have to update the data and print this weekly which consumes a lot of paper which is mostly wasted. I would like to have two additional options

1) I would like to send each output to a new worksheet in a new workbook which I can then distribute instead of wasting paper

2) Would it be possible to send each to the same worksheet without overwriting each other? Note that each output is not of the same number of rows

Thanks for your help. My current code is below: (Note: I know my code is probably inefficent, but it works. If you have comments on making this code more efficent please email me at so this post can on track

On Error Resume Nex
Dim pt As PivotTabl
Dim pf As PivotFiel
Dim pi As PivotIte
Dim pfarray(25
Dim piarray(25, 50

Set pt = ActiveSheet.PivotTables("LT_Two"

i =

For Each pf In pt.PageField
pfarray(i) = pf.Nam
j =
For Each pi In pf.PivotItem
piarray(i, j) = pi.Nam
y =
j = j +
Nex
x =
i = i +
Nex

j =

For p = 1 To
i =
j = j +
pt.PivotFields(pfarray(i)).CurrentPage = piarray(i, j
i = i +
For j = 1 To
pt.PivotFields(pfarray(i)).CurrentPage = piarray(i, j

Set TableRange = Range("AP6", Range("AP" & Rows.Count).End(xlUp).Offset(, 14)
TableRange.PrintOut 'use this for printin
' TableRange.PrintPreview 'use this for testin
Nex
i =
j =
Next
 
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
One pivot table cannot overlap another pivot issue. Avi Excel Discussion (Misc queries) 1 October 5th 09 02:29 PM
Pivot Table Issue PiB311 Excel Worksheet Functions 2 September 14th 09 08:59 PM
Complex Pivot Table Function DyingIsis Excel Discussion (Misc queries) 1 May 23rd 08 12:50 AM
Pivot table sum issue Phil Smith Excel Discussion (Misc queries) 5 May 15th 08 03:18 AM
Complex Pivot Table Sukh Excel Discussion (Misc queries) 3 March 2nd 07 01:50 PM


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