Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default change pivot filter through code

Hi,

I've posted before on this, but had no luck - annoying as I know it is
possible since I've done it myself in the past (but lost the file!).

I have 2 pivot tables on a sheet which both have the same report filters.

When I change the filter selection on pivot table 1, I want (assumingly
through code) for pivot table 2 to automatically apply the same report filter.

Hope u can help,

Thanks,

Basil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default change pivot filter through code

I did it eventally. It seems that Excel 2003 onwards can have issues with
this. My code was correct in the first place but I had to rebuild everything.
Also although I would assume that I could reference the current page of one
pivot table to set the current page of the other pivot table, Excel coud not
get it, so I had to reference a cell that pointed at the current page of the
pivot table:

If Range("Piv_Sport") < Range("Piv_Sport_Check") Then
Range("Piv_Sport_Check") = Range("Piv_Sport")
ActiveSheet.PivotTables("Weekly").PivotFields("Spo rt").CurrentPage =
Range("Piv_Sport").Value
Else
Range("Piv_Market_Check") = Range("Piv_Market")
ActiveSheet.PivotTables("Weekly").PivotFields("Mar ket
Search").CurrentPage = Range("Piv_Market").Value
End If

Basil

"Basil" wrote:

Hi,

I've posted before on this, but had no luck - annoying as I know it is
possible since I've done it myself in the past (but lost the file!).

I have 2 pivot tables on a sheet which both have the same report filters.

When I change the filter selection on pivot table 1, I want (assumingly
through code) for pivot table 2 to automatically apply the same report filter.

Hope u can help,

Thanks,

Basil

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Single Filter to change all Pivot Tables in a Workbook Kathy L.[_2_] Excel Discussion (Misc queries) 8 March 15th 11 08:52 AM
Several Pivot Tables: Change one filter and adapt it for the other Aloha08 Excel Discussion (Misc queries) 2 June 12th 09 02:49 AM
Changing pivot filter causes chart type to change! Why? DenizDuelec Excel Programming 2 August 28th 08 10:24 AM
Color Code Filter indicators - Change from Blue to Red Martinson44 Excel Worksheet Functions 0 November 10th 04 04:25 AM
How do I get Pivot filter change event to fire? Claude Excel Programming 4 August 15th 03 10:24 PM


All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"