excel透视表无添加字段

If you're using Excel 2007 or Excel 2010, you can quickly see which fields in a pivot table have filters applied. For example, in the screenshot below, the ItemSold field has been filtered.

如果您使用的是Excel 2007或Excel 2010,则可以快速查看数据透视表中的哪些字段已应用过滤器。 例如,在下面的屏幕截图中,ItemSold字段已被过滤。

The arrow drop down has changed to a filter symbol, with a tiny arrow.

箭头下拉列表已更改为带有小箭头的过滤器符号。

In Excel 2003 though, there's no indicator that a field has been filtered. Here's the same filtered pivot table in Excel 2003, and the drop down arrows look the same in both of the fields.

但是,在Excel 2003中,没有指示器表明已过滤字段。 这是Excel 2003中相同的过滤后的数据透视表,并且下拉箭头在两个字段中看起来都相同。

There's no marker to show if either field has been filtered. You'd have to click each arrow, to see if any of the check marks have been removed from the pivot items. Who has time for that?

没有标记可显示是否已过滤任何一个字段。 您必须单击每个箭头,以查看是否已从数据透视表项中删除了所有复选标记。 谁有时间?

创建自己的过滤器标记 (Create Your Own Filter Markers)

Several of my clients are still using Excel 2003, and maybe you use it too. If so, you'll appreciate this sample file from AlexJ, which adds a bright blue marker above each filtered field.

我的几个客户仍在使用Excel 2003,也许您也使用它。 如果是这样,您会欣赏来自AlexJ的此样本文件,该文件在每个过滤的字段上方添加了一个亮蓝色标记。

That makes it easy to keep track of what's been changed in the pivot table, and prevents you from overlooking the filters.

这样可以轻松跟踪数据透视表中的更改,并防止您忽略过滤器。

To create the markers, Alex wrote a user defined function, named pvtFilterID.

为了创建标记,Alex编写了一个用户定义的函数,名为pvtFilterID。

In the screenshot below, you can see the pvtFilterID formula in cell D5, which refers to the ItemSold field heading in cell D7.

在下面的屏幕快照中,您可以在单元格D5中看到pvtFilterID公式,该公式引用单元格D7中的ItemSold字段标题。

=pvtFilterID(D$7)

= pvtFilterID(D $ 7)

The formula is used in cells B5:D5, above the row fields, and that range could be adjusted if your pivot table has a different number of row fields.

该公式用于行字段上方的单元格B5:D5中,并且如果您的数据透视表具有不同数量的行字段,则可以调整该范围。

蓝色箭头标记 (The Blue Arrow Marker)

Cell D1 is named Symbol.Filter, and it contains the blue arrow symbol that's used as a marker. If you changed the symbol there, the new symbol would be used as the filter marker.

单元格D1命名为Symbol.Filter,它包含用作标记的蓝色箭头符号。 如果在此处更改符号,则新符号将用作过滤器标记。

In cell G5 there's another formula, that shows a message if any of the pivot table fields are filtered.

在单元格G5中,还有另一个公式,该公式显示是否过滤了任何数据透视表字段的消息。

=IF(COUNTIF($B$5:$D$5,Symbol.Filter)>0, "Pivot Filter On" & Symbol.Filter,"")

= IF(COUNTIF($ B $ 5:$ D $ 5,Symbol.Filter)> 0,“ Pivot Filter On”&Symbol.Filter,“”)

This formula checks the cells above the pivot table, and shows the message if any of those cells contain the marker symbol.

此公式检查数据透视表上方的单元格,并显示消息,如果其中任何一个单元包含标记符号。

也可以与切片机一起使用 (Works With Slicers Too)

Even though Alex wrote this code for Excel 2003 pivot tables, it works in Excel 2007 and Excel 2010 too.

即使Alex为Excel 2003数据透视表编写了此代码,它也可以在Excel 2007和Excel 2010中使用。

In the screenshot below, you can see and Excel 2010 pivot table with slicers, and the filter markers highlight the row fields where filters have been applied.

在下面的屏幕截图中,您可以看到带有切片器的Excel 2010数据透视表,并且过滤器标记突出显示了已应用过滤器的行字段。

The filter symbol is on the field drop downs too, and the bright blue markers are extra insurance that users notice which fields are filtered.

过滤器符号也在字段下拉列表中,并且明亮的蓝色标记是用户可以注意到哪些字段已过滤的额外保证。

过滤器标记功能代码 (The Filter Marker Function Code)

Here's Alex's code for the pvtFilterID function.

这是pvtFilterID函数的Alex代码。

Function pvtFilterID(rng As Range) As String  'rng As Range)
On Error GoTo XIT ' -not in pivot
If Not rng.Parent Is ActiveSheet Then GoTo XIT
If rng.Cells.Count > 1 Then
MsgBox "Error: pvtFilterID range selection"
GoTo XIT
End If
If rng.PivotField.HiddenItems.Count > 0 Then
pvtFilterID = [Symbol.Filter]
End If
XIT:
End Function

清除数据透视表过滤器 (Clear the Pivot Table Filters)

Another nice feature that was added to Excel 2007 pivot tables is the Clear All Filters command. Alex's workbook contains a button that runs code to remove all the filters from a pivot table.

Excel 2007数据透视表中添加的另一个不错的功能是“清除所有筛选器”命令。 Alex的工作簿包含一个按钮,该按钮运行代码以从数据透视表中删除所有过滤器。

Here's the code for the ClearPivotFilters procedure.

这是ClearPivotFilters过程的代码。

Sub ClearPivotFilters(ws As Worksheet)
Dim pvt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Dim lSort As Long
On Error Resume Next
Set pvt = ws.PivotTables("PivotTable1")
For Each pf In pvt.VisibleFields
If pf.HiddenItems.Count > 0 Then
lSort = pf.AutoSortOrder
pf.AutoSort xlManual, pf.SourceName
For Each pi In pf.PivotItems
pi.Visible = True
Next pi
End If
pf.AutoSort lSort, pf.SourceName
Next pf
Set pi = Nothing
Set pf = Nothing
Set pvt = Nothing
End Sub

The button code passes the worksheet name to the procedure.

按钮代码将工作表名称传递给过程。

Private Sub cmdClearPvtFilters_Click()
Call ClearPivotFilters(Me)
End Sub

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

To test the pivot table filter markers, and see the VBA code, you can download Alex's sample file from the Contextures website.

若要测试数据透视表过滤器标记并查看VBA代码,可以从Contextures网站下载Alex的示例文件。

On the AlexJ Sample Files page, go to the Pivot Tables section, and look for: PT0000 - Pivot Table Filter Markers ___________

在“ AlexJ示例文件”页面上,转到“ 数据透视表”部分 ,然后查找: PT0000-数据透视表过滤器标记 ___________

翻译自: https://contexturesblog.com/archives/2010/11/19/add-filter-markers-in-excel-pivot-table/

excel透视表无添加字段


http://www.taodudu.cc/news/show-4715846.html

相关文章:

  • WPS Office 2019 版本 excel透视图创建及删除
  • 本地数据仓库项目(一) —— 本地数仓搭建详细流程
  • 华为 两条线路负载均衡_华为无线AP4050DN接入点高可靠性,高安全性!
  • 使用 Nginx 构建前端日志统计服务(打点采集)服务
  • 头盔检测数据集和论文
  • python示波器 波形数据_Python在嵌入式开发中的应用——数据示波器
  • 云服务器安装SSL证书,实现https访问
  • 第7章 Python3 数据类型转换教程
  • Android 浅谈 Activity (下)
  • Linux多线程---线程概念和线程控制
  • Mongodb 索引 对查询结果的排序
  • linux electron-**r 打开正常,配置正常,却用不了
  • SourceTree配置代理详细方法
  • nextjs动态导入和 ssr:false
  • PM2 自动化部署项目 之 (Vue SSR)
  • react-ssr
  • Vue SSR 渲染 Nuxt3 入门学习
  • 如何在 React 18中 利用Suspense 实现 服务端渲染(SSR)
  • Nuxt.js(Vue SSR)项目配置以及开发细节
  • SSR 配置postcss 自动将px转化为rem
  • i31115g4和r34300u哪个好
  • 华硕笔记本无法设置U盘启动,快捷启动不能识别
  • 不用找代理,教你如何在新系统自己申请软著(软件著作权)
  • 老板:为什么你们的软件迟迟上不了线?
  • Python实现汽车油耗预测_基于Tensorflow2.X
  • Duplicate keys detected “***“.This may cause can up date error,解决方案。
  • Charles You may need to configure your browser ...【解决办法】
  • [Linux]tomcat 严重: Could not contact localhost:80. Tomcat may not be running
  • 瞳距自测软件app 测试准确吗,瞳孔距离检测手机app-瞳孔距离检测最新版手机软件预约 v1.0-友情手机站...
  • 【2022最新Java面试宝典】—— Java并发编程面试题(123道含答案)

excel透视表无添加字段_在Excel数据透视表中添加过滤器标记相关推荐

  1. excel透视表无添加字段_为内部字段添加数据透视表小计

    excel透视表无添加字段 How was your weekend weather? We had a mini-blizzard yesterday, that covered the backy ...

  2. 【Excel 2013 数据透视表 学习】一、创建数据透视表

    1 数据透视表 是Excel中数据处理分析工具. 用途: 1. 快速分类汇总.比较大量数据. 2. 快速变化统计分析维度查看统计结果. 数据透视表不仅综合了数据排序.筛选.组合及分类汇总等数据分析方法 ...

  3. php读取excel中文匹配_PHP根据Excel表头指定的字段,自动匹配数据

    背景 在使用PHP解析Excel数据的时候,经常期望能把Excel中的数据自动和数据库字段建立上映射关系: 比如下图一 - Excel文件,图二 - 数据库字段 如果读取Excel后直接返回下面的数据 ...

  4. a表两个字段都与b表一个字段关联_Oracle系列第二章----表,精彩延续。。。

    第一节 表的概念 表设计的原则 2.1 表 数据库中以表为组织单位存储数据.表用来存储一些事物的信息,首先需要有一个表名,以及存储的信息. 2.2 设计原则 好的数据库表设计会影响数据库操作效率.特别 ...

  5. mysql把一个表的字段赋值到另一张表,多表之间常用的操作

    文章目录 mysql多表之间的常用操作 1. 根据主键,把一个表的字段赋值到另一张表 2. replace into:把一张表的数据新增或更新到另一张表 mysql多表之间的常用操作 1. 根据主键, ...

  6. matlab里excel汉字怎么显示,如果EXCEL里既有字母,汉字又有数据,在MATLAB中该如何读取?|excel提取重复项...

    如何用matlab提取excel表格里面的第五列数据和第七列表示时间的数据 可接一整列导入,和其他数据一样import data,或xlsread.只不过对于时间数据,matlab会做转换. 对于日期 ...

  7. mysql 数据展示装置_实时生成数据宽表的方法和装置与流程

    本发明涉及计算机技术领域,尤其涉及一种实时生成数据宽表的方法和装置. 背景技术: 数据仓库是面向主题的.集成的.相对稳定的.随时间不短变化得数据集合,用以支持经营管理中的决策制定.数据仓库中的数据面向 ...

  8. 需要将表格做成web端应用 表格大概200多个 表格字段基本上都差不多 每张表的字段差不多100多个 每张表的接口就2个业务都是一样的 请问该怎么做?

    需要将表格做成web端应用 表格大概200多个 表格字段基本上都差不多 每张表的字段差不多100多个 每张表的接口就2个业务都是一样的 请问大神们该怎么做? 后端用springboot mybatis ...

  9. 用exp无法导出空表解决方法/用exp导出数据时表丢失原因

    用exp无法导出空表解决方法/用exp导出数据时表丢失原因 最早的一次使用oracle 11g导出数据发现有的表丢失了,感觉莫名其妙的,后来终于找到原因了. 找到问题以后,再看看解决方案. 11GR2 ...

最新文章

  1. [转]深刻理解Python中的元类(metaclass)
  2. 使用 Docker 搭建 Tomcat 运行环境
  3. HotSpot VM运行时01---命令行选项解析
  4. 【Centos 8】【Centos 7】【Docker】 添加 DockerHub 的镜像地址
  5. 在java中使用JMH(Java Microbenchmark Harness)做性能测试
  6. mysql查询锁表及解锁
  7. 一步一步写算法(之 可变参数)
  8. CentOS6的python2.6升级到python2.7以上版本(可能更详细)
  9. poster模板_高分北斗大赛报名进行中,ppt、poster展示模板推送
  10. lammps学习总结3
  11. 【Applied Algebra】求解布尔方程(Boolean Equations)的4个高效baseline算法
  12. 读书笔记:《群论彩图版》
  13. 一文解读广告投放落地页
  14. c语言建立线性表输入,c语言 建立线性表 链式
  15. html+word-break-all,强制换行word-break:break-all怎么用?
  16. Python pandas 里面的数据类型坑,astype要慎用
  17. Andersen Global拓展巴西业务版图;在巴西新增合作公司
  18. 我国农村宅基地有偿退出机制构建研究
  19. 混沌策略和单纯形法改进的鲸鱼优化算法
  20. 微信支付宝手机网站支付(WAP)

热门文章

  1. 期货十三篇 第七篇 平仓篇
  2. 在qt中实现图片的加载
  3. 读取文件路径中的图片
  4. MBA案例分析(管理之道在于“借力”二)
  5. 计算某一年的二月是多少天
  6. 不懂程序看的明白《黑客帝国》吗?
  7. 网站采集工具之免费帝国CMS采集聚合
  8. 提交github后自动完成habitica habit
  9. Git问题:windows下git@gitlab.com: Permission denied (publickey)问题
  10. 数学与计算机学院文化节,我院成功举办第二届数学文化节暨计算科学文化交流月活动...