Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

One report filter for multiple worksheets

Posted on 2011-03-01
1
Medium Priority
?
516 Views
Last Modified: 2012-08-14
I'm trying to find a way to use report filters for a pivot table in one worksheet and apply the same filters to 5 other worksheets in the workbook that contain similar data. In other words, when I select the report parameters (customerID,start date, end date) I want the pivot tables on the remaining worksheets to use the same parameters to populate the corresponding pivot tables and charts.  I'm using Excel 2007/Windows.
0
Comment
Question by:Ed_CLP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
hitsdoshi1 earned 2000 total points
ID: 35011688
For eg...on Sheet1 is:
A1: CustomerID
A2: StartDate
A3: End Date

And you have Pivots on Sheet2, Sheet3, Sheet4 and so on.....

Following code will do the job...


Sub UpdatePivots()
Sheets("Sheet2").PivotTables("Pivot1").PivotFields("CustID").CurrentPage = Sheets("Sheet1").Range("A1").Value
Sheets("Sheet3").PivotTables("Pivot2").PivotFields("CustID").CurrentPage = Sheets("Sheet1").Range("A1").Value
Sheets("Sheet4").PivotTables("Pivot3").PivotFields("CustID").CurrentPage = Sheets("Sheet1").Range("A1").Value

Sheets("Sheet2").PivotTables("Pivot1").PivotFields("StartDt").CurrentPage = Sheets("Sheet1").Range("A2").Value

And so on...

Open in new window

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question