Show Values in Pivot Table Filter

hankscorpio

New Member
Joined
Oct 27, 2010
Messages
2
Hi,

Is it possible to show the values in a pivot table filter?

When I filter by one item, it shows what item I'm filtering on (say "A" for example).

When I filter by more than one item, it shows "(Multiple Items)".

I would like to show what those multiple items are on the sheet (say "A" and "B" for example).

This would make things a lot easier when I distribute reports.

Is this possible?

Thanks in advance.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
hi. It will be possible. This code shows some ideas (outputs to the immediate window) to help you. regards, F
Code:
Sub test()
  Dim blnAllShowing As Long
  Dim pi As PivotItem
  Dim pf As PivotField
  Dim pt As PivotTable
  Dim wks As Worksheet
  Dim ar() As String
  For Each wks In Worksheets
    For Each pt In wks.PivotTables
 
      Debug.Print vbCr & "worksheet """ & wks.Name & """, pivot table """ & pt.Name & """"
 
      For Each pf In pt.PivotFields
 
        Select Case pf.Orientation
 
          Case xlPageField, xlColumnField, xlRowField
 
            'determine if all pivot items are showing
            blnAllShowing = True
            For Each pi In pf.PivotItems
              If pi.Visible = False Then blnAllShowing = False
            Next pi
 
            If blnAllShowing Then
              Debug.Print Tab(3); "pivot field """ & pf.Caption & """"; Tab(40); "No filters."
            Else
              Debug.Print Tab(3); "pivot field """ & pf.Caption & """"; Tab(40); "==> Filter/s on this field."
              For Each pi In pf.PivotItems
                If pi.Visible Then Debug.Print Tab(44); """" & pi.Name & """"
              Next pi
            End If
 
          Case xlDataField, xlHidden
        End Select
 
      Next pf
    Next pt
  Next wks
  Set pi = Nothing
  Set pf = Nothing
  Set pt = Nothing
  Set wks = Nothing
End Sub
 
Upvote 0
Hi,

Thanks for the input. I know very little about VBA, so unfortunately I don't think that I can use this.

I'm going to take a different approach. I'm going to use the new slicer option in 2010 to show the multiple values.

I think that it will be sufficient enough, and I think that I might be able to do everything I want using this new option.

It takes up a bit of real estate on the sheet, but I think that the end user will appreciate some of the formatting that one can use with a slicer.


Cheers,

Hank
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,655
Members
448,975
Latest member
sweeberry

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