#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Print Area

I have a sheet that has various formulas that return blank cells. How
do I set the print area dynamically so that is stops based on a
column's length?

Any Ideas? The sheet length changes daily and I don't want user to
have to change settings at all...

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Print Area

I like this approach (with those formulas in column A):


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 mo
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).

Nimish wrote:

I have a sheet that has various formulas that return blank cells. How
do I set the print area dynamically so that is stops based on a
column's length?

Any Ideas? The sheet length changes daily and I don't want user to
have to change settings at all...


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Print Area

Dave,

Does this technique work if I need to replicate this for 14 different
worksheets in the same workbook? I thin I am getting some name
conflicts that I don't understand how to deal with.

Nimish


Dave Peterson wrote:
I like this approach (with those formulas in column A):


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 mo
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).

Nimish wrote:

I have a sheet that has various formulas that return blank cells. How
do I set the print area dynamically so that is stops based on a
column's length?

Any Ideas? The sheet length changes daily and I don't want user to
have to change settings at all...


--

Dave Peterson


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Print Area

The parts that you have to be careful with:

Names in workbook: Sheet1!LastRow
Names in workbook: Sheet1!Print_Area

Make sure you include the sheet name when you do this.

But some sheet names require apostrophes surrounding the names (just like a
formula in a cell):

Names in workbook: 'Sheet1'!LastRow
Names in workbook: 'Sheet1'!Print_Area

If you always use the apostrophes, excel won't mind. If you need them and don't
use them, you'll have trouble.

And change Sheet1 to whatever worksheet you're working on.

Names in workbook: 'My SheetName Here'!LastRow
Names in workbook: 'My SheetName Here'!Print_Area



Nimish wrote:

Dave,

Does this technique work if I need to replicate this for 14 different
worksheets in the same workbook? I thin I am getting some name
conflicts that I don't understand how to deal with.

Nimish

Dave Peterson wrote:
I like this approach (with those formulas in column A):


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 mo
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).

Nimish wrote:

I have a sheet that has various formulas that return blank cells. How
do I set the print area dynamically so that is stops based on a
column's length?

Any Ideas? The sheet length changes daily and I don't want user to
have to change settings at all...


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Print Area

Dave,

Never got back to you, but thank you very much.


Dave Peterson wrote:
The parts that you have to be careful with:

Names in workbook: Sheet1!LastRow
Names in workbook: Sheet1!Print_Area

Make sure you include the sheet name when you do this.

But some sheet names require apostrophes surrounding the names (just like a
formula in a cell):

Names in workbook: 'Sheet1'!LastRow
Names in workbook: 'Sheet1'!Print_Area

If you always use the apostrophes, excel won't mind. If you need them and don't
use them, you'll have trouble.

And change Sheet1 to whatever worksheet you're working on.

Names in workbook: 'My SheetName Here'!LastRow
Names in workbook: 'My SheetName Here'!Print_Area



Nimish wrote:

Dave,

Does this technique work if I need to replicate this for 14 different
worksheets in the same workbook? I thin I am getting some name
conflicts that I don't understand how to deal with.

Nimish

Dave Peterson wrote:
I like this approach (with those formulas in column A):


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 mo
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).

Nimish wrote:

I have a sheet that has various formulas that return blank cells. How
do I set the print area dynamically so that is stops based on a
column's length?

Any Ideas? The sheet length changes daily and I don't want user to
have to change settings at all...

--

Dave Peterson


--

Dave Peterson




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Print Area

Glad it worked for you.

Nimish wrote:

Dave,

Never got back to you, but thank you very much.

Dave Peterson wrote:
The parts that you have to be careful with:

Names in workbook: Sheet1!LastRow
Names in workbook: Sheet1!Print_Area

Make sure you include the sheet name when you do this.

But some sheet names require apostrophes surrounding the names (just like a
formula in a cell):

Names in workbook: 'Sheet1'!LastRow
Names in workbook: 'Sheet1'!Print_Area

If you always use the apostrophes, excel won't mind. If you need them and don't
use them, you'll have trouble.

And change Sheet1 to whatever worksheet you're working on.

Names in workbook: 'My SheetName Here'!LastRow
Names in workbook: 'My SheetName Here'!Print_Area



Nimish wrote:

Dave,

Does this technique work if I need to replicate this for 14 different
worksheets in the same workbook? I thin I am getting some name
conflicts that I don't understand how to deal with.

Nimish

Dave Peterson wrote:
I like this approach (with those formulas in column A):


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 mo
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).

Nimish wrote:

I have a sheet that has various formulas that return blank cells. How
do I set the print area dynamically so that is stops based on a
column's length?

Any Ideas? The sheet length changes daily and I don't want user to
have to change settings at all...

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra Row in Defined Print Area Harry Gordon Excel Discussion (Misc queries) 3 November 14th 05 03:06 AM
Can't Clear Print Area GeorgeF Excel Discussion (Misc queries) 2 August 5th 05 06:10 PM
Volatile print area stevepain Excel Discussion (Misc queries) 6 July 20th 05 05:46 PM
set the print area print multiple tabs veng Excel Discussion (Misc queries) 5 February 12th 05 07:01 PM
Printing - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM


All times are GMT +1. The time now is 05:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"