Programable Print Area?

komobu

New Member
Joined
Feb 7, 2011
Messages
29
Is it possible to adjust the print area program-ably?

I have a print area of say Cell A1 to Cell E50. This will do for 80% of my needs. Occasionally the table may extend another 15 rows or so. For this I would like to add a column F and use an "If" statement like If(E51 <>"", Set print area A1 to E51") then I could copy that statement down to E100 .

Is something like this possible?

Thanks for any help
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

Just turn on your macro recorder ...

Once you have go through your process ... you will get a macro where you can insert all the variables you need ...

Hope this will help
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
12,645
Office Version
365, 2010
Platform
Windows, Mobile
Are you in reality just trying to set the print to the last row in column E each time?
 

komobu

New Member
Joined
Feb 7, 2011
Messages
29
Hello,

Just turn on your macro recorder ...

Once you have go through your process ... you will get a macro where you can insert all the variables you need ...


Hope this will help
Thanks james, but the sheet will be used by someone else. I was hoping to avoid macros if possible. I really have to make this sheet to be able to be used by people that dont know excel.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
12,645
Office Version
365, 2010
Platform
Windows, Mobile
No...I have notes and tax data on the page starting at row 100, and that stuff I dont want printed.
Is the next row after the row in column E that you want printed blank? is column F blank? and are there any blank rows or columns within the print area?

I was hoping to avoid macros if possible.
You won't be able to set the print area without using a macro or manually setting it each time. You can't do it with a formula. You can get the macro to run automatically when the sheet is activated, the workbook opened etc. but the user will still have to enable macro's.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
12,645
Office Version
365, 2010
Platform
Windows, Mobile
Thanks Eric, learnt something new today :)
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
9,751
Great, glad we could help! :)

Mark, someday I hope to learn everything about Excel! I'm pretty sure that day will never come, but I'll keep working at it.
 

Watch MrExcel Video

Forum statistics

Threads
1,099,082
Messages
5,466,537
Members
406,485
Latest member
kaksolver

This Week's Hot Topics

Top