到目前为止,这是我的代码,但它并没有做我需要它做的事情,这是按照名为&#34的总计Total列排序的" RevVarLY的总和"。
ThisWorkbook.Worksheets("3").PivotTables("PivotTable3").PivotFields("RevVarLY").AutoSort Order:=xlDescending, Field:="Total Sum of RevVarLY"
答案 0 :(得分:0)
The Values Fields can only be sorted by the 'natural' groupings formed by the fields to the immediate left. If you only have one row field, then you can do what you want. If you have more, then you can't.