Printing multiple pivot tables with macro (button)

galadiman

Board Regular
Joined
Apr 4, 2007
Messages
66
I am making a button that will print multiple pivot tables with a single click. But the tables will update periodically. So I am looking for a way to 'name' the ranges to which the pivot tables belong in the macro, then print the named range, rinse and repeat.

I think I can do most of it by simply recording the macro... but, Can someone help me in finding out how to set a range to reference a pivot table as a whole, rather than manually select the range to which the pivot table belongs each time?
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

galadiman

Board Regular
Joined
Apr 4, 2007
Messages
66
Still can't get this pivot table print automated...any help?

I am still having trouble with this.

When I select the pivot table while recording the macro, the table is selected properly, but when I name it as the print range, it throws in 'absolute' addressing, rather than referring to the table.

So if I add a column to the sheet, that column pushes the last pivot table column off the print range, and it doesn't print. Similarly, if I move the range, it messes up the print range because it is "absolutely" addressed.

This also happens if I put in the intermediate step of selecting the pivot table, naming a defined range after it, then setting it as the print range, then deleting the named range - it addresses the named range as a set of absolute references, rather than the pivot table name, or something like that.

If anyone can shed some light on this, I would be very grateful. Cookies, even! :)
 

galadiman

Board Regular
Joined
Apr 4, 2007
Messages
66
Can I get a hand?

Any help with this? I can't figure out how to set a dynamic print range to cover a pivot table... It's hard to believe this hasn't come up yet...

Thanks for any help...
 

galadiman

Board Regular
Joined
Apr 4, 2007
Messages
66
Can I get a hand?

Any help with this? I can't figure out how to set a dynamic print range to cover a pivot table... It's hard to believe this hasn't come up yet...

Thanks for any help...
 

Watch MrExcel Video

Forum statistics

Threads
1,123,318
Messages
5,600,925
Members
414,416
Latest member
Nobu

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