How to re-sort a pivot table filter

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
 
J

Jim Thomlinson

Check out this link. It describes removing old items but it also resorts the
existing itmes.
 
W

wburbage

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
 

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