ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Collapsing a table (https://www.excelbanter.com/excel-programming/313555-collapsing-table.html)

jayceejay

Collapsing a table
 
I have an Excel table, defined as "database" that contains 100 rows, followed
by a totals line. My problem is this:
Sometimes I will need to use all 90 rows in the table, but quite often,
there will be a need for considerably fewer rows, and I wind up wasting paper
printing all the blank rows in the table that contain no data. Is there a
was to collapse the table so that it does NOT show all the blank record lines?


Martin

Collapsing a table
 
I would set up a macro or script that would check each line in the table and
hide the row if it is blank. Do your printing, then unhide the hidden rows
later.



"jayceejay" wrote:

I have an Excel table, defined as "database" that contains 100 rows, followed
by a totals line. My problem is this:
Sometimes I will need to use all 90 rows in the table, but quite often,
there will be a need for considerably fewer rows, and I wind up wasting paper
printing all the blank rows in the table that contain no data. Is there a
was to collapse the table so that it does NOT show all the blank record lines?


Debra Dalgleish

Collapsing a table
 
Record the steps as you select a cell in the table, and choose
DataFilterAutoFilter.
Then, filter one of the columns for Non-blanks.
Print the sheet
Choose DataFilterAutoFilter, to remove the filter


jayceejay wrote:
I have an Excel table, defined as "database" that contains 100 rows, followed
by a totals line. My problem is this:
Sometimes I will need to use all 90 rows in the table, but quite often,
there will be a need for considerably fewer rows, and I wind up wasting paper
printing all the blank rows in the table that contain no data. Is there a
was to collapse the table so that it does NOT show all the blank record lines?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


jayceejay

Collapsing a table
 
That's a great idea, but it's the code I am struggling with. The number of
blank rows is going to be different each time, and I am probably making this
harder than it needs to be. The only macro's I have ever done are of the
point & click variety.

"Martin" wrote:

I would set up a macro or script that would check each line in the table and
hide the row if it is blank. Do your printing, then unhide the hidden rows
later.



"jayceejay" wrote:

I have an Excel table, defined as "database" that contains 100 rows, followed
by a totals line. My problem is this:
Sometimes I will need to use all 90 rows in the table, but quite often,
there will be a need for considerably fewer rows, and I wind up wasting paper
printing all the blank rows in the table that contain no data. Is there a
was to collapse the table so that it does NOT show all the blank record lines?



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

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