简体   繁体   English

Excel VBA数据透视表筛选器隐藏

[英]Excel VBA Pivot Table Filter Hide

I am currently making a dashboard which uses pivot tables and slicers to pull through the data. 我目前正在制作一个仪表板,该仪表板使用数据透视表和切片器来读取数据。 When I add the pivot table excel displays all of the fields which I am using as the 'report filter'. 当我添加数据透视表时,excel将显示所有用作“报告过滤器”的字段。 When I then come to arrange my data I am unable to put tables closely together (as they can not overlap) and have to hide all of these fields from the users view. 然后,当我开始整理数据时,我无法将表紧密放在一起(因为它们不能重叠),并且必须从用户视图中隐藏所有这些字段。

Does anybody know any VBA which could simply be used to hide the report filter from appearing in the actual body of the workbook itself? 是否有人知道可以简单地用来将报表筛选器隐藏在工作簿本身中的任何VBA? So I can then display tables closely together? 这样我可以紧密地一起显示表格吗?

That would be great! 那很好啊! Thank you. 谢谢。

If you've got Excel 2010 or later, then here's a way, with no VBA necessary: Don't add those those fields to the Report Filter area. 如果您拥有Excel 2010或更高版本,则可以采用以下方法,而无需VBA:不要将这些字段添加到“报表过滤器”区域。 Instead, add Slicers for those fields, put them somewhere out of site, and use those Slicers to filter the PivotTable instead. 而是,为这些字段添加切片器,将它们放置在站点外的某个地方,然后使用这些切片器来筛选数据透视表。

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

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