使用VBA读取数据透视表中的每个总计值 [英] Reading each Grand Total value in Pivot Table using VBA
问题描述
我有一个使用VBA创建的数据透视表。 我想读取每个总数的值,如果它是0,我想要隐藏整行。
下面的示例如下,这是一个数据透视表,这种情况我想要隐藏"Joe's"行。
姓名 预算 支出 总计
Joe   1000   1000   0
简   500     100 400
总计 1500   1100 400
ruth
Excel 2016 Pro Plus使用PowerPivot。
过滤具有Budget = Spent的记录。
带有DAX的PowerPivot有自己独特的VBA宏术语。
现在,Power Query使用M取代VBA为数据透视表准备数据。
http:// www.mediafire.com/file/34jbjj36xn1pe2e/04_28_14a.xlsm
I have a pivot table that I created using VBA. I want to read the value of each total and if it is 0 I want to hide the entire row.
Here is the example below, this is a pivot table and in this situation I want to hide "Joe's" row.
Name Budget Spend Total
Joe 1000 1000 0
Jane 500 100 400
Total 1500 1100 400
ruth
Excel 2016 Pro Plus with PowerPivot.
Filter records that have Budget=Spent.
PowerPivot with DAX has its own unique VBA macro terms.
Nowadays, Power Query with M takes the place of VBA to prepare data for a PivotTable.
http://www.mediafire.com/file/34jbjj36xn1pe2e/04_28_14a.xlsm
这篇关于使用VBA读取数据透视表中的每个总计值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!