ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can't deselect drop down field in a pivot table (https://www.excelbanter.com/excel-discussion-misc-queries/107899-cant-deselect-drop-down-field-pivot-table.html)

[email protected]

Can't deselect drop down field in a pivot table
 
Hi folks,

I've got a problem where in any new pivot table the drop down boxes for
the field data no longer allow me to deselect anything. For example, I
have data counted by time, grouped by month/year, and I want to turn
off 2005 - I used to be able to do this, but I can no longer. I assume
there's a global setting somewhere that I have inadvertently changed,
but I can't find it!

I've tried new pivot tables on new, very simple data with no luck.
I've restarted PC also.

Any thoughts?

Cheers
Aidan


Carim

Can't deselect drop down field in a pivot table
 
Hi,

Thanks to Debra, here is the macro I use to get rid of Unsused items
....

Sub DeleteOldItems()

Dim ws As Worksheet
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem

On Error Resume Next
For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.RefreshTable
pt.ManualUpdate = True
For Each pf In pt.VisibleFields
If pf.Name < "Data" Then
For Each pi In pf.PivotItems
If pi.RecordCount = 0 And _
Not pi.IsCalculated Then
pi.Delete
End If
Next pi
End If
Next pf
pt.ManualUpdate = False
pt.RefreshTable
Next pt
Next ws

End Sub


HTH
Cheers
Carim



All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com