Pivot Report Filter

ls010s

New Member
Joined
May 8, 2013
Messages
16
Hi
I need some help with the following:

I have 4 sheets in my excel workbook. Sheet1 is blank, sheet2 has a pivot, sheet3 has a pivot and sheet4 has the raw data for the pivot.

I use the pivot to view sales by agent (we have 35). I want to put the agent number on sheet1 manually and want the report filter on sheet2 and sheet3 to pick that number up and report against that agent number.

Is there a function I can use or can you please help out with a VBA code to achieve this? I use Office 2007.

Regards
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi,


2 things you have change before running this macro 1. Instead of pivotTable5 ".PivotTables("PivotTable5")" you should replace your pivottable names for pivotTable5 and pivotTable6
2.Instead of Event Year "PivotFields("Event Year")" you should replacce your pivottable names for both pivotTables.




create a module and paste the below code
sub checkdata


Worksheets("Sheet1").Select
Range("a1").Select
temp = ActiveCell.Value


Worksheets("Sheet2").Select
ActiveSheet.PivotTables("PivotTable5").PivotFields("Event Year").PivotFilters. _
Add Type:=xlCaptionEquals, Value1:=temp

Worksheets("Sheet3").Select
ActiveSheet.PivotTables("PivotTable6").PivotFields("Event Year").PivotFilters. _
Add Type:=xlCaptionEquals, Value1:=temp
End Sub

Thanks,
SK
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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