Pivot Page field filter based on cell value

M

michel.wielens

Hi, I am new in VBA and I have created a code that gets information
from an access query and set up a pivot table. The worksheet contains
multiple pivottables. All pivot tables have at least one page field
(product). The worksheet should be copied and then every pivot on the
active sheet should be filtered on one product (example: worksheet for
milk, worksheet for cheese, worksheet for etc). This for every product
(couple op 30-35 products).

How can I copy the 'mastersheet' (named ' Master') and filter all
pivot tables for a specific Page field product?
 
S

Shane Devenshire

Hi,

Select the pivot table and choose the command PivotTable, Show Pages, pick
the product field if necessary and click OK
 
M

michel.wielens

Great! Never knew of this option! However, their are multiple pivot
tables on one page, and know he only set up new sheets for the
selected pivot table (obvious). I would like to select all pivot
tables on the sheet and run this command. This requires vba I think?
 
S

Shane Devenshire

Hi,

And, when you run it for one pivot table it generates say 10 new sheets.
Then when you run if for another pivot table it generates another 10 new
sheets. It doesn't put the second set on the sheets with the first set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top