PDA

View Full Version : Loop through Pivot Table Filter field from a List and create pdf



Mysore
03-15-2016, 06:52 PM
Hi Folks

Attached is a sample file. Looking for a VBA solution to filter the Pivot Filter field from a list and then create a pdf file.
In the attached file , I have a ProductList holding values A , B & C. I need pivot table to refresh for each corresponding values from the list and then generate a pdf file. If there is no data for a specific product Say C in my sample data, I want the sub routine to omit completely without creating any blank pdf.

Appreciate any help.

Thanks
Mysore

Leith Ross
03-17-2016, 02:28 PM
Hello Mysore,

When you say No Data, do you mean a Blank entry or no Quantity or Sales amount?

Mysore
03-17-2016, 02:35 PM
Hello Mysore,

When you say No Data, do you mean a Blank entry or no Quantity or Sales amount?

Where there are no transaction data for product C ie no quantity or Sales.

Thanks

Leith Ross
03-17-2016, 02:38 PM
Hello Mysore,

If a PDF file already exists for a product in the list, do you want to replace the old PDF with the new one?

Mysore
03-17-2016, 02:45 PM
Hi Ross

This report would be generated everyday,hence I would like the following

1) Pdf to be saved in the same folder where the excel file resides.
2) Pdf to saved with the Product Name along with Date& Time Stamp.

Thanks

Leith Ross
03-17-2016, 02:53 PM
Hello Mysore,

Thanks, that is what I needed to know.

Mysore
03-17-2016, 03:02 PM
Thanks Ross. Just forgot to mention one more point.
The Product List will be a dynamic list, hence I would create it using a Named Range.
The VB loop code should refer to this Named Range rather than a fixed Range.

Mysore
03-18-2016, 02:48 PM
Hi Ross
Just wondering if you had a chance to look into it.
Thanks