ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pivot Tables & not printing blank rows (revisited) (https://www.excelbanter.com/excel-worksheet-functions/38646-pivot-tables-not-printing-blank-rows-revisited.html)

[email protected]

Pivot Tables & not printing blank rows (revisited)
 
I have an excel file that updates a pivot table when I run a macro. The
size of the re-generated pivot table (in the # of rows) can vary
depending on the source data. When I print the pivot table, I don't
want to print pages and pages of blank rows underneath. I also don't
want to have to resize my print area each time. In the past I have
avoided this problem by clearing the print area instead of setting a
print area. However, if I try to format a large # of rows [background
color, text alignment etc] to accomodate a wide ranging pivot table
size, excel then assumes that you want ALL of these rows printed
regardless of the size of the pivot table, even though the rows after
the table are blank. Is their any way to avoid this?


Marcus Langell

In Excel 2003 (at least), if you apply the formatting within the pivot table,
the formatting follows the size of the pivot table. If this doesn't work in
your workbook you should be able to solve it by making the formatting
conditional on whether or not there is data in the cells.

/Marcus


" wrote:

I have an excel file that updates a pivot table when I run a macro. The
size of the re-generated pivot table (in the # of rows) can vary
depending on the source data. When I print the pivot table, I don't
want to print pages and pages of blank rows underneath. I also don't
want to have to resize my print area each time. In the past I have
avoided this problem by clearing the print area instead of setting a
print area. However, if I try to format a large # of rows [background
color, text alignment etc] to accomodate a wide ranging pivot table
size, excel then assumes that you want ALL of these rows printed
regardless of the size of the pivot table, even though the rows after
the table are blank. Is their any way to avoid this?




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com