Hi All
I have a nifty bit of code written by forum member @Eastw00d 2 months ago here
https://www.excelforum.com/excel-for...eld-names.html
I'm wondering if there is anyway to amend it to retrieve a list of selected items in the pivot table filter instead?
Sub GetPivotFields()
Application.ScreenUpdating = False
Dim PvtTbl As pivottable
Dim pvtFld As PivotField
Dim strPvtFld As String
Set PvtTbl = ActiveSheet.PivotTables("PivotTable1")
For Each pvtFld In PvtTbl.RowFields
strPvtFld = strPvtFld & ", " & pvtFld.Name
Next
ActiveSheet.Cells(25, 10) = "Row Labels"
ActiveSheet.Cells(26, 10) = Mid(strPvtFld, 3)
Application.ScreenUpdating = True
End Sub
I have 5 filters on the table, one is called 'Case Type'
I'd really like to be able to run a macro to print a list of which case types have been selected
Any help appreciated
All the best
Vicky
Bookmarks