• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

creating batch pdf from pivot table

iceblocks

Member
Hi all,

Greatly appreciate if someone can help me with writing this macro as this is way beyond my limited vba skills. I have attached a simplified version of the excel file.

I have a pivot table within an Excel file that shows product numbers and the associated price and date/time information for each product based on a list which can change each month.

I need a macro to do the following:

1. Automatically filter the pivot table to show the information for 1 product at a time based on the required list at cell B13:B14 (this list is subject to change each months).

2. Save the resulting Report table (with the filter on) from cell F5 to M12 to a PDF file.

3. Apply the filter to the next vendor number (cell B1) ...and so on until I have 1 PDF file created for each product.

4. And automatically save the pdf files with their respective product number as the file name.

Many thanks in advance.

iceblocks
 

Attachments

  • batch report to pdf2.xlsm
    18.6 KB · Views: 7
Hi iceblocks,

Give this a shot. I tried to provide comments at beginning of macro so you know what you need to change, if anything.

To print only the specified block of cells, I changed the print area of the sheet. If this is your actual file, should be good, but if your real report is somewhere else, you'll need to use the Page Layout - Print Area - Set Print Area command.
 

Attachments

  • batch report to pdf2 LM.xlsm
    22.8 KB · Views: 26
Back
Top