数据透视表选择多个标签_更新多个数据透视表20130618

数据透视表选择多个标签

In this screen shot, one of the report filters in a pivot table is about to be changed. If you have multiple pivot tables in a workbook, you can use programming to update all (or some) of the pivot tables, if one pivot table’s filters are changed.

在此屏幕快照中,数据透视表中的报表过滤器之一将被更改。 如果工作簿中有多个数据透视表,则在更改一个数据透视表的筛选器的情况下,可以使用编程来更新所有(或某些)数据透视表。

Here is one of the pivot tables, with a Report Filter being changed.

这是数据透视表之一,报告过滤器已更改。

updatemultiplepivottables01

I’ve written sample code that updates multiple pivot tables, and one is changed, and last year, Jeff Weir shared his version of the code, which runs very quickly.

我编写了示例代码来更新多个数据透视表,并且其中一个被更改。去年,Jeff Weir共享了他的代码版本,该版本运行非常快。

Jeff’s code has another advantage too – in his version, you can specify:

Jeff的代码也有另一个优点-在他的版本中,您可以指定:

  • any sheets you DON'T want the macro to check

    您不希望宏检查的任何工作表
  • any specific pivot tables that you DON'T want the macro to synchronize.

    您不希望宏进行同步的任何特定数据透视表。

NOTE: Jeff's code is intended for pivots that DO NOT all share the same cache. If your pivots all share the same cache, then you can use my approach set out here: Filter Multiple Pivot Tables With Excel 2010 Slicers

注意:杰夫(Jeff)的代码供完全共享同一缓存的数据透视表使用。 如果所有数据透视表共享相同的缓存,则可以使用此处列出的方法: 使用Excel 2010 Slicer筛选多个数据透视表

To confirm whether or not your pivots share the same cache, you can use my code here: Excel Pivot Caches

要确认您的数据透视表是否共享相同的缓存,可以在此处使用我的代码: Excel Pivot缓存

针对Excel 2010和更高版本进行了改进 (Improved for Excel 2010 and Later)

This week, Jeff is sharing his latest version of his code. It now checks the Excel version that you are using.

本周,Jeff将分享他的代码的最新版本。 现在,它将检查您正在使用的Excel版本。

  • If you are using Excel 2010 and later, the code uses Slicers to change any pivot tables that share the same cache, as this is much faster. Any other pivots are then processed without slicers.

    如果您使用的是Excel 2010及更高版本,则代码将使用切片器更改共享同一缓存的所有数据透视表,因为这样做的速度要快得多。 然后,无需切片器即可处理任何其他枢轴。

下载样本文件 (Download the Sample File)

To download this version of the sample file, with Jeff's code, please visit the Sample Files page on the Contextures website.

要使用Jeff的代码下载此版本的示例文件,请访问Contextures网站上的“ 示例文件”页面

In the Pivot Tables section, look for: PT0029 - Change Pivot Table Fields on Specific Sheets

在“数据透视表”部分中,查找: PT0029-更改特定工作表上的数据透视表字段

The file is in xlsm format, zipped, and contains macros. Enable the macros when opening the file, if you want to test the code.

该文件为xlsm格式,已压缩并包含宏。 如果要测试代码,请在打开文件时启用宏。

Note: Jeff's sample file was updated on June 16, 2013, so please download the new version if you have an older copy of the file. __________________

注意:Jeff的样本文件已于2013年6月16日更新,因此,如果文件的副本较旧,请下载新版本。 __________________

翻译自: https://contexturesblog.com/archives/2013/06/18/update-multiple-pivot-tables-20130618/

数据透视表选择多个标签

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值