Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a PivotTable w/o selecting data in an existing PivotTable Damian Excel Discussion (Misc queries) 6 November 2nd 07 04:44 PM
2007 Autofilter worse than 2003 Autofilter jsky Excel Discussion (Misc queries) 9 October 31st 07 12:14 AM
Pivottable Jan Excel Discussion (Misc queries) 6 January 31st 07 10:44 PM
AutoFilter and PivotTable Epinn New Users to Excel 1 October 10th 06 07:57 AM
How to Sort within AutoFilter with Protection on (and AutoFilter . giblon Excel Discussion (Misc queries) 1 February 16th 06 12:23 PM


All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"