Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: Office FAQ

PivotTable Tips

Old Pivot Items causing PivotTable problems by SkipVought
Posted: 13 Nov 08

It seems that something called the PivotCache, stores every value that each PivotField EVER had.

Sometimes, these are invalid values, like blanks in date fields, for instance, and these invalid values render features like Grouping unuseable.

Don't throw up your hands in surrender. Clean your PivotCache instead.  Paste this little function into a MODULE in the Visual Basic Editor.
How to:
1. alt+F11 (toggles between sheet and VB Editor)
2. ctr+R (displays the Project Explorer)
3. Insert > Module


Sub CleanMyPivots()
'SkipVought/2007 Apr 30
'cleans up pivot tables having OLD/UNUSED data hanging around.
    Dim pc As PivotCache
    For Each pc In ActiveWorkbook.PivotCaches
       pc.MissingItemsLimit = xlMissingItemsNone
End Sub
Just run this macro in your workbook to get rid of all those unused items.

Back to Microsoft: Office FAQ Index
Back to Microsoft: Office Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close