How to change and print multiple filters of a single pivot table at once?

Vernoos

New Member
Joined
Jul 12, 2016
Messages
1
Overview:
I have a pivottable with filter. The filter contains a list from 1 to 30, each of which must be printed separately. That is, each time I have to change the filter and print the filtered result.


My demand:
What I want is to print all of them at once.


Conditions:
The list of numbers is not continous or static. It means that some numbers are droped and some new numbers may be added later.


My Current Situation and Challange:

By means of macro recorder command, I could arrive up to the following situation. But the problem is that, I don't know how to make it dynamic. I mean, how to say "do the procedure for the existing numbers".


Can anyone help me please to correct and complete the following macro?


Code:
Sub Makro1()
    '
    ' Makro1 Makro
    '     
        ActiveSheet.PivotTables("Leistungsnachweise").PivotFields("Tour").CurrentPage _ = "1"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _ IgnorePrintAreas:=False
        ActiveSheet.PivotTables("Leistungsnachweise").PivotFields("Tour").CurrentPage _ = "2"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _ IgnorePrintAreas:=False
 
    End Sub



Thanks,
Dio
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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