Excel VBA - How to filter a pivot table using the search RRS feed

  • General discussion

  • I am trying to figure out how to filter data in a pivot table if the data is "like" data in a cell.  I've been able to successfully do this on worksheets where I am not using a pivot table by simply using wildcards, however; on the Pivot Table, I am unable to do this (e.g. CurrentPage = "*" & SPAnalyst & "*").

    Is there a way to do this in VBA?  Below is the current code I am using.

    With Sheet12
    .AutoFilterMode = False
        Sheet12.PivotTables("Submitted_by_Month"). _
        Sheet12.PivotTables("Submitted_by_Month").PivotFields("S&P Analyst(s)"). _
            EnableMultiplePageItems = True
        Sheet12.PivotTables("Submitted_by_Month").PivotFields("S&P Analyst(s)").CurrentPage = SPAnalyst

    • Moved by Youen Zen Thursday, May 2, 2013 8:42 AM From Visual Basic
    Wednesday, May 1, 2013 5:17 PM

All replies