Can't deselect drop down field in a pivot table

A

aidan.schurr

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
 
C

Carim

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top