Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Linking auto filters to pivot on another worksheet

Hi all,

Can anyone help?


I have used the code below to successfully link 3 auto filters to a
pivot table on another worksheet.


1. Area (Sales area)
2. MA (Market area)
3. Name (Centre name)


When I select values using each of the 3 filters it works perfectly
i.e. the pivot table changes to show the data from my selection. The
problem I have is that I want the filters to work independently e.g.
if I select only the area filter and the other filters remain un
selected, I want the pivot table to show all of the data for the
selected area only.
I assume I need to use an IF statement to say if a filter is not used
then show "(ALL)" default aut filter value?


The code I am using is as follows:


Private Sub Worksheet_Activate()
Dim rCell As Range, strArea As String
Dim strMA As String, StrName As String


On Error Resume Next
For Each rCell In Blad1.Range("A4:C4")
Select Case UCase(rCell)
Case "AREA"
strArea = rCell.End(xlDown)
Case "MA"
strMA = rCell.End(xlDown)
Case "NAME"
StrName = rCell.End(xlDown)


Case Else
End Select
Next rCell


With Me.PivotTables("PivotTable1")
.PivotFields("Area").CurrentPage = strArea
.PivotFields("MA").CurrentPage = strMA
.PivotFields("Name").CurrentPage = StrName


End With
On Error GoTo 0
End Sub


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
Linking Lists and Filters between Worksheets in Excel kilgore.of.trout New Users to Excel 3 October 30th 08 03:26 PM
Pivot Table filters, especially DATE filters chris Excel Worksheet Functions 0 August 27th 08 04:33 AM
auto filters and worksheet protection Joanne Excel Worksheet Functions 3 May 11th 07 05:17 AM
How can I auto-refresh auto-filters when data changes? Mike@MPWco Excel Worksheet Functions 0 July 4th 06 12:50 PM
Linking to Pivot data in another worksheet RestlessAde Excel Discussion (Misc queries) 0 December 6th 05 09:30 PM


All times are GMT +1. The time now is 04:14 AM.

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

About Us

"It's about Microsoft Excel"