Assigning a Page Break Value

Bowser1966

New Member
Joined
Oct 6, 2002
Messages
2
Is there a way to set a page break value from a value in a cell on a worksheet. For example if cell A5 has a value fo 22 in it I want to set my page break with that value.
For example:
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$35"

I would like to set my value of 35 to the value in cell A5 of 22.
The reason I need a value of a cell is because there is a formula to count the rows which is constantly changing, and when Im ready to print the page break has to be set correctly to the value in A5.
Any suggestions would be appreciated
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

plettieri

Well-known Member
Joined
Sep 4, 2002
Messages
1,556
Platform
  1. MacOS
Hello Browser1966

Welcome to the board

Have you tried naming your range to print,,,ie "printarea" so that your print area will be adjusted automatically each time you have an insert or deletion of a column or row?

Once you named you range add it to your macro.

Hope this helps.
pll
 

Bowser1966

New Member
Joined
Oct 6, 2002
Messages
2
Well, thats my problem I want the new rows to be added to the print area but I want the print area to be fixed at a specific column Such as P.
This message was edited by Bowser1966 on 2002-10-08 15:25
This message was edited by Bowser1966 on 2002-10-08 19:37
 

Forum statistics

Threads
1,143,613
Messages
5,719,713
Members
422,242
Latest member
hishamkhatri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top