Dynamic Print Range

putzhead

Board Regular
Joined
Nov 24, 2003
Messages
96
Office Version
  1. 2013
Platform
  1. Windows
Looking for help with a dynamic print range formula. I have data in range A:H and would like to create a dynamic print range based on column D.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I think this will require VBA.

Please provide more specifics on what the range should look like.
What row do we start on?
Are we just looking for the last row in column D with data, or are we to use the information in column D differently (if so, please explain)?

It might be helpful if you walk us though an example of exactly how you would like this to work.
 
Upvote 0
The print range is just a named variable named Print_Area. You can create a dynamic range using OFFSET to get a dynamic range. See here:

 
Upvote 0
The print range is just a named variable named Print_Area. You can create a dynamic range using OFFSET to get a dynamic range.
Pretty cool Eric. I did not know that, so I learned something new today!

Hopefully, the OP will be able to incorporate that into their workbook.
 
Upvote 0
Putzhead: Glad it works for you!

Joe: There is so much about Excel I still don't know! I'm penciling in 2100 or so to learn it all.
 
Upvote 0
You can't do this through formula but through VBA with the example code below...

Change D1 to whatever row your cell reference print area is located at in D column.

VBA Code:
ActiveSheet.PageSetup.PrintArea = "D1"
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,755
Members
449,094
Latest member
dsharae57

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
Back
Top