View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Self Adjusting Print Area

If Excel isn't choosing the correct print range automatically (possibly due
to outlying cells you don't want included, you might try something like this:

<Insert<Name<Define
Names in workbook: Print_Area

If your print data begins in A1:D1 and you want it to continue through the
last nonblank cell in Col_A...

Where there may be blanks within Col_A:
Refers to:
=OFFSET(Sheet3!$A$1:$D$1,,,MAX(MATCH(10^99,Sheet3! A:A),MATCH(REPT("z",255),Sheet3!$A:$A)))

If there will be no blanks in Col_A then:
Refers to: =OFFSET(Sheet3!$A$1:$D$1,,,COUNTA(Sheet3!$A:$A))

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Paperback Writer" wrote:

Is there a way to set the print area so that it automatically adjusts down as
new lines are added?