Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA AutoFilter of a PivotTable
Hello,
I'm having trouble with my Macro that Filters a Pivottable. What i'm trying to do is sort the pivot table on the totals so i can highlight them and bold them. If there is an better way to do this i would appreciate it. Below is the code that was generated from recording the macro, problem is it dosen't work when you try to replay it. Selection.AutoFilter ActiveSheet.Range("$A$4:$L$2150").AutoFilter Field:=13, Criteria1:="=1", _ Operator:=xlOr, Criteria2:="=" Thanks, Josh |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA AutoFilter of a PivotTable
hi Josh, Rather than using an autofilter would it work if you recorded a macro of rightclicking on a cell in the "row fields" section of the pivot table, choosing Field Settings - Advanced - Sort... which should generate something like the below code? Code: -------------------- ActiveSheet.PivotTables("PivotTable1").PivotFields ("gf").AutoSort xlDescending, "Sum of dgf" -------------------- hth Rob -- broro183 Rob Brockett. Always learning & the best way to learn is to experience... ------------------------------------------------------------------------ broro183's Profile: http://www.thecodecage.com/forumz/member.php?userid=333 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=118446 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a PivotTable w/o selecting data in an existing PivotTable | Excel Discussion (Misc queries) | |||
2007 Autofilter worse than 2003 Autofilter | Excel Discussion (Misc queries) | |||
Pivottable | Excel Discussion (Misc queries) | |||
AutoFilter and PivotTable | New Users to Excel | |||
How to Sort within AutoFilter with Protection on (and AutoFilter . | Excel Discussion (Misc queries) |