Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing variable length pages

3 views
Skip to first unread message

General Specific

unread,
Jan 25, 2007, 9:34:52 AM1/25/07
to
Our warehouse will be scanning barcodes into a spreadsheet and then
printing. Anyone know how to vary the page area so that only the rows
with data are printed?

Dave Peterson

unread,
Jan 25, 2007, 10:17:24 AM1/25/07
to
Saved from a previous post.

I bet you have pretty borders around all the cells -- and you don't want those
future rows to print.

Can you use data|Filter|autofilter to show just the rows that don't appear
empty?

===
If those formulas appear at the end of the data and you don't want to use
autofilter...

If I can pick out a column indicates if that row is used or not, then I like
this technique:

(I used column A in my sample, but you can use any column you want.)

Insert|Name|Define
Names in workbook: Sheet1!LastRow
Use this formula
Refers to: =LOOKUP(2,1/(Sheet1!$A$1:$A$1000<>""),ROW(Sheet1!$A$1:$A$1000))

(Make that 1000 big enough to extend past the last possible row.)

Then once more:
Insert|Name|Define
Names in workbook: Sheet1!Print_Area
Use this formula
Refers to: =OFFSET(Sheet1!$A$1,0,0,lastRow,3)

That last 3 represents the last column to print (A:C in my example).

And change the worksheet (sheet1) if necessary (in all the places).

--

Dave Peterson

0 new messages