Collapsing a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
Record the steps as you select a cell in the table, and choose
Data>Filter>AutoFilter.
Then, filter one of the columns for Non-blanks.
Print the sheet
Choose Data>Filter>AutoFilter, to remove the filter
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top