How to re-sort a pivot table filter

  • Thread starter Thread starter wburbage
  • Start date Start date
W

wburbage

I maintain a file that includes one data tab and then about 20 pivot tables
running off that data. So when I run a new report I simply replace the data
and refresh the tables. Most of the reports are based on the "project" field
which includes roughly 1,200 different projects and increases on a monthly
basis.

Since there's contantly new projects being added to the data the new project
gets placed on the bottom of the pivot table filter. So if I'm looking for a
particular project the filter itself may or may not be in order. Is there a
way to re-sort the filters within a pivot table filter so this project list
is once again in order?

Thanks,
Bill
 
Check out this link. It describes removing old items but it also resorts the
existing itmes.
 
Thanks Jim but it didn't seem to work.

To keep the file down to a somewhat manageable size I'm using the following
macro to make sure I'm working off the same cache. Could this be a cause to
my problem?

------------------------
Sub ChangePivotCache()
'change pivot cache for all pivot tables in workbook
Dim pt As PivotTable
Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
For Each pt In wks.PivotTables
pt.CacheIndex = Sheets("IB IT Key
Initiatives").PivotTables(1).CacheIndex
Next pt
Next wks

End Sub
 
Back
Top