• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pivot table: value filter on report filter

Hi

Can you add a label filter to a report filter in a pivot table?

I'm trying to use a wild card to retrieve the top 10 for for example "????A".

The input "????A" would come from a cell in another sheet.

So far I managed to get below code

Sub wildcard()

'

' wildcard Macro

'


'

ActiveSheet.PivotTables("PivotTable2").PivotFields("Key").ClearAllFilters

ActiveSheet.PivotTables("PivotTable2").PivotFields("Key").PivotFilters.Add _

Type:=xlCaptionEndsWith, Value1:="???MB"

End Sub


If I can get "???MB" or any other combination taken from the cell in another sheet and use it in the report filter instead of the row labels the problem would be solved.

Any help would be much appreciated!
 
Back
Top