#1   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Print Area

How can I set a print area using macros, up to the last filled row and hard
code the number of columns ?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Print Area

The preferred method is to use a defined name
Assuming you have a Print_Area modify it to use an OFFSET formula such as
=offset($a$1,0,0,counta($a:$a)-1,15)
Now, it will be self adjusting without action on your part
Look in the help index for OFFSET


Don Guillett
Microsoft MVP Excel
SalesAid Software

"nc" wrote in message
...
How can I set a print area using macros, up to the last filled row and
hard
code the number of columns ?


  #3   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Print Area

Thanks. One problem with the name method is that I have to define a name
plus code for each print button on the worksheet. If I use your formula
below, Excel adds the sheet name. I cannot use active sheet in the name.

The second is that I am using a macro that deletes the row a1, before
printing.


"Don Guillett" wrote:

The preferred method is to use a defined name
Assuming you have a Print_Area modify it to use an OFFSET formula such as
=offset($a$1,0,0,counta($a:$a)-1,15)
Now, it will be self adjusting without action on your part
Look in the help index for OFFSET


Don Guillett
Microsoft MVP Excel
SalesAid Software

"nc" wrote in message
...
How can I set a print area using macros, up to the last filled row and
hard
code the number of columns ?



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
set area in excel not giving me option to set print area? J Littlebear Excel Discussion (Misc queries) 4 April 23rd 23 09:04 PM
File, print area, clear area, is not working cblind New Users to Excel 2 September 12th 07 04:51 PM
print area across the freeze panes area tom Excel Worksheet Functions 2 January 6th 07 05:23 PM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM


All times are GMT +1. The time now is 04:07 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"