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?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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! :)
 
Upvote 0
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...
 
Upvote 0
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...
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,943
Members
448,534
Latest member
benefuexx

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