简体   繁体   English

如何使用VBA按证书总数总计列对数据透视表进行排序?

[英]How do I sort a pivot table by certan Grand Total column using VBA?

这是到目前为止我的代码,但它不会做什么,我需要它做的事,这是种由名为“RevVarLY的合计金额”总计列。

 ThisWorkbook.Worksheets("3").PivotTables("PivotTable3").PivotFields("RevVarLY").AutoSort Order:=xlDescending, Field:="Total Sum of RevVarLY"

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. 如果您有更多,那您就不能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM