Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default How do I make a dynamic print range in excel?

How do I make excel automatically adjust the print area to print only the
rows with information in them?

Thanks for the help.
Herd
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How do I make a dynamic print range in excel?

Depends on what you mean...

If the rows at the bottom are really empty -- no formulas, no nothing, then
excel should be able to figure out what should be printed.

But sometimes you may have to reset the lastused cell so that it matches with
what you think it should be.

Visit Debra Dalgleish's site for some techniques for resetting that
lastusedcell.
http://www.contextures.com/xlfaqApp.html#Unused

On the other hand, if you have formulas in those rows that evaluate to "",
resetting the last used cell won't help.

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


Herd wrote:

How do I make excel automatically adjust the print area to print only the
rows with information in them?

Thanks for the help.
Herd


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default How do I make a dynamic print range in excel?

When I follow your instructions, it works great the first time, then when I
add a couple rows of data... the last print range is still held

If I check the named range, the function =OFFSET(Sheet1!$A$1,0,0,lastRow,3)
has been replaced with the actual range

"Dave Peterson" wrote:

Depends on what you mean...

If the rows at the bottom are really empty -- no formulas, no nothing, then
excel should be able to figure out what should be printed.

But sometimes you may have to reset the lastused cell so that it matches with
what you think it should be.

Visit Debra Dalgleish's site for some techniques for resetting that
lastusedcell.
http://www.contextures.com/xlfaqApp.html#Unused

On the other hand, if you have formulas in those rows that evaluate to "",
resetting the last used cell won't help.

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


Herd wrote:

How do I make excel automatically adjust the print area to print only the
rows with information in them?

Thanks for the help.
Herd


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How do I make a dynamic print range in excel?

If you go into File|Page Setup, you'll have to redo the Sheet1!Print_Area name.

tmirelle wrote:

When I follow your instructions, it works great the first time, then when I
add a couple rows of data... the last print range is still held

If I check the named range, the function =OFFSET(Sheet1!$A$1,0,0,lastRow,3)
has been replaced with the actual range

"Dave Peterson" wrote:

Depends on what you mean...

If the rows at the bottom are really empty -- no formulas, no nothing, then
excel should be able to figure out what should be printed.

But sometimes you may have to reset the lastused cell so that it matches with
what you think it should be.

Visit Debra Dalgleish's site for some techniques for resetting that
lastusedcell.
http://www.contextures.com/xlfaqApp.html#Unused

On the other hand, if you have formulas in those rows that evaluate to "",
resetting the last used cell won't help.

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


Herd wrote:

How do I make excel automatically adjust the print area to print only the
rows with information in them?

Thanks for the help.
Herd


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I make a dynamic print range in excel?

Hi,

To reset the print area, to the dynamic range,you can use this macro,
however make sure that the defined name Print_Area in every worksheet has the
formula that was previously inplemented in this discussion

Macro:

Sub Print_custom()
With ActiveSheet
..PageSetup.PrintArea = ActiveSheet.Range("A1:A10")
..PageSetup.PrintArea = ActiveSheet.Range("Print_Area").Address
End With

End Sub

Thanks,
RaveendiranRR




"Dave Peterson" wrote:

If you go into File|Page Setup, you'll have to redo the Sheet1!Print_Area name.

tmirelle wrote:

When I follow your instructions, it works great the first time, then when I
add a couple rows of data... the last print range is still held

If I check the named range, the function =OFFSET(Sheet1!$A$1,0,0,lastRow,3)
has been replaced with the actual range

"Dave Peterson" wrote:

Depends on what you mean...

If the rows at the bottom are really empty -- no formulas, no nothing, then
excel should be able to figure out what should be printed.

But sometimes you may have to reset the lastused cell so that it matches with
what you think it should be.

Visit Debra Dalgleish's site for some techniques for resetting that
lastusedcell.
http://www.contextures.com/xlfaqApp.html#Unused

On the other hand, if you have formulas in those rows that evaluate to "",
resetting the last used cell won't help.

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


Herd wrote:

How do I make excel automatically adjust the print area to print only the
rows with information in them?

Thanks for the help.
Herd

--

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
NUMBER OF ROWS IN A DYNAMIC RANGE Larry Excel Worksheet Functions 0 July 14th 06 09:19 PM
Using a range variable inside a excel function Michael Excel Discussion (Misc queries) 2 November 14th 05 02:52 PM
excel 2003 changing saved print settings George Applegate Excel Discussion (Misc queries) 0 November 1st 05 06:50 PM
How do I put a watermark under cells in excel and make it print? Watermarks Excel Worksheet Functions 1 July 1st 05 05:49 PM
How do I make range bar graphs in Excel 2002? jeffkoko Charts and Charting in Excel 1 February 23rd 05 08:13 PM


All times are GMT +1. The time now is 08:19 PM.

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"