数据透视表可以两列汇总列吗

When you create a pivot table, a default PivotTable Style is automatically applied. You can change to a different style, and you can even create custom pivot table styles. To help you keep track of the styles that you have, here's a List All Pivot Table Styles macro.

创建数据透视表时,将自动应用默认的数据透视表样式。 您可以更改为其他样式,甚至可以创建自定义数据透视表样式。 为了帮助您跟踪所拥有的样式,这里是“列出所有数据透视表样式”宏。

数据透视表自定义样式 (Pivot Table Custom Styles)

If you're not sure how to create your own custom pivot table style, this short video shows the steps. Also, there are step-by-step written instructions on my Contextures site, on the Pivot Table Formatting page.

如果您不确定如何创建自己的自定义数据透视表样式,则此简短视频将显示步骤。 另外,我的Contextures网站上的“数据透视表格式”页面上还有逐步的书面说明。

演示地址

默认和自定义数据透视表样式 (Default and Custom Pivot Table Styles)

There are  about 85 built-in pivot table styles in my version of Excel – there might be more than that in your version, or fewer styles.

在我的Excel版本中,大约有85种内置的数据透视表样式-可能比您的版本中的样式表更多,或者更少。

If you create custom pivot table styles, they'll be added to that list too. The custom styles also appear at the top of the style gallery.

如果您创建自定义数据透视表样式,它们也会添加到该列表中。 自定义样式也显示在样式库的顶部。

列出所有数据透视表样式 (List All the Pivot Table Styles)

To get a list of all the pivot table styles in the active workbook, use the macro that's shown below. The macro adds a sheet to the workbook, with a list of the pivot table style settings.

若要获取活动工作簿中所有数据透视表样式的列表,请使用下面显示的宏。 该宏将工作表添加到工作簿,并带有数据透视表样式设置的列表。

The list shows the style name and number, whether it's built in or custom, the header colour,  and inside border colour.

列表显示样式名称和编号(无论是内置样式还是自定义样式),标题颜色和内部边框颜色。

NOTE: Lots of black is used for the style formatting, so the macro shows a black dot, instead of filling the cell with black. I find that easier to read, and it also saves on printer toner, if you want to print the list!

注意:很多黑色用于样式格式设置,因此宏显示一个黑点,而不是用黑色填充单元格。 如果您要打印列表,我发现它更易于阅读,并且还节省了打印机碳粉!

列出所有数据透视表样式的宏 (Macro to List All Pivot Table Styles)

This macro to list all Pivot Table styles is in the sample workbook that you can download. There are four other macros too, to list and set the styles.

您可以下载示例工作簿中的此列出所有数据透视表样式的宏。 还有四个其他宏,用于列出和设置样式。

Or, to use this macro in your own workbook, copy the code below to a regular code module. Then, add a worksheet button to run the macro, or run it from the Macros command on the Excel Ribbon's View tab.

或者,要在自己的工作簿中使用此宏,请将下面的代码复制到常规代码模块中 。 然后,添加一个工作表按钮以运行宏,或从Excel功能区的“视图”选项卡上的“宏”命令运行它。

Sub StylesPTListALL()
Dim wb As Workbook
Dim lStyle As Long
Dim stl As TableStyle
Dim ws As Worksheet
Dim myRow As Long
Dim lClrH As Long
Dim lClrB As Long
Set wb = ActiveWorkbook
Set ws = Sheets.Add
On Error Resume Next
With ws
.Range(Cells(1, 1), Cells(1, 5)).Value _
= Array("Style", "Name", "BuiltIn", _
"Header", "Borders")
End With
myRow = 2
For lStyle = 1 To wb.TableStyles.Count
Set stl = wb.TableStyles(lStyle)
If stl.ShowAsAvailablePivotTableStyle = True Then
ws.Cells(myRow, 1).Value = lStyle
ws.Cells(myRow, 2).Value = stl.NameLocal
ws.Cells(myRow, 3).Value = stl.BuiltIn
lClrH = stl.TableStyleElements _
.Item(xlHeaderRow).Interior.Color
If lClrH = 0 Then
ws.Cells(myRow, 4).Value = "•"
Else
ws.Cells(myRow, 4).Interior.Color = lClrH
End If
lClrB = stl.TableStyleElements _
.Item(xlWholeTable) _
.Borders(xlInsideHorizontal).Color
If lClrB = 0 Then
ws.Cells(myRow, 5).Value = "•"
Else
ws.Cells(myRow, 5).Interior.Color = lClrB
End If
myRow = myRow + 1
End If
Next lStyle
With ws
.Range("A1:E1").Font.Bold = True
.Range("G1").Value = "• = Black"
.Columns("A:G").EntireColumn.AutoFit
.Columns("C:E").HorizontalAlignment = xlCenter
.Columns(6).ColumnWidth = 3.57
.Range("A1").Select
End With
End Sub

获取样本工作簿 (Get the Sample Workbook)

To get the sample workbook with pivot tables, custom styles, and more macros, go to the Pivot Table Styles Macros page on my Contextures website.

若要获取带有数据透视表,自定义样式和更多宏的示例工作簿,请转到Contextures网站上的“ 数据透视表样式宏”页面 。

The zipped file is in xlsm format, and contains macros. Be sure to enable macros when you open the workbook, if you want to test the macros.

压缩文件为xlsm格式,并包含宏。 如果要测试宏,请确保在打开工作簿时启用宏。

数据透视表工具 (Pivot Table Tools)

To save time when building, formatting and modifying your pivot tables, use the tools in my Pivot Power Premium add-in. With just a few clicks, you can:

为了节省构建,格式化和修改数据透视表时的时间,请使用我的Pivot Power Premium加载项中的工具 。 只需单击几下,您就可以:

  • copy the formatting from one pivot table, and apply it to another pivot table.从一个数据透视表复制格式,然后将其应用于另一数据透视表。
  • change all the values from Count to Sum将所有值从Count更改为Sum
  • remove the "Sum of" from all the headings从所有标题中删除“总和”

and much more!

以及更多!

更多数据透视表资源 (More Pivot Table Resources)

Pivot Table Formatting

数据透视表格式

Classic Pivot Table Format

经典数据透视表格式

Copy Pivot Table Formatting

复制数据透视表格式

翻译自: https://contexturesblog.com/archives/2018/05/17/list-all-pivot-table-styles-macro/

数据透视表可以两列汇总列吗


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

相关文章:

  • R可视化:用Shiny实现类Excel数据透视图
  • excel数据透视表_来自多个工作表的Excel数据透视表更新
  • 数据透视创建传统布局_更改数据透视图布局
  • 数据透视表 筛选_筛选器选择中的数据透视图标题
  • UiPath Excel创建数据透视图(21.10现代设计体验)
  • excel 宏 数据透视表_宏从多个文件创建Excel数据透视表
  • excel数据透视_取消透视Excel数据的快速方法
  • C#使用NPOI实现Excel数据透视
  • 简单实现POI操作Excel生成数据透视图
  • 比较Excel数据透视图中的年度数据
  • 80行python代码查询你想要的英雄信息
  • pyecharts制图笔记
  • 手机必备epub阅读软件
  • 2016.03.20
  • 酷狗音乐html5韩国,韩国SHOFAR MUSIC独家入驻酷狗 脸红的思春期掀收听热
  • 年底了是时候学新技术了「GitHub 热点速览 v.21.52」
  • 你的电脑适合升级 Win11 吗?「GitHub 热点速览 v.21.26」
  • 《暗黑破坏神2》重置版 采访记录(一)
  • 远程文件拷贝(fastcopy为例)
  • 一个复制也能玩出花来
  • 鼠标灵敏度怎么调?Mac系统调整鼠标灵敏度教程
  • C#修改系统的鼠标移动速度
  • win7玩游戏时不能全屏该怎么解决
  • openni.utils.InitializationError: OpenNI2 could not be loaded:
  • java使用bytebuddy动态生成带泛型的DTO
  • 编码解码与文件操作
  • TGY_Windows 8.1 x64 企业版(集成Office2013)
  • 理解volatile关键字
  • 酷狗小试页面和简写代码
  • 由酷狗官网界面改造成的焦点新闻插件

数据透视表可以两列汇总列吗_列出所有数据透视表样式宏相关推荐

  1. 按某列获取几行_机器学习获取数据难?别忘记特征工程

    现实世界中的数据可能十分混乱复杂,不论它是相关的SQL数据库.Excel文件或是其它任何数据源.尽管这些数据通常都是表格的结构,即每一行(样本)相对于每一列(特征)都有其对应的值,但是这些数据可能很难 ...

  2. sql 同一张表中两个记录不能共存_如何分析交易记录?

    [题目] 某商场为了分析用户购买渠道.表1是用户交易记录表,记录了用户id.交易日期.交易类型和交易金额. 表2是用户类型表,记录了用户支付类型(微信.支付宝.信用卡等),分别有type1.type2 ...

  3. python做值班表预测_Django model一张表中两个字段设置外键参考另一张表两个字段...

    class products(models.Model): MODE_CHOICES=(('week','周'),('day','日')) productname=models.CharField(m ...

  4. 怎么改变表单option标签直接字体大小_不起眼却非常重要的表单交互

    表单是什么?是用户和app之间的对话.作为人机交互的一种重要入口,一个好的数据输入方式是很有必要去考虑的.但现实中,我们大多设计师和产品经理前期设计的时候就没有太多的考虑,到最后开发的时候就会发现问题 ...

  5. oracle查询一列汇总,【学习笔记】Oracle数据筛选 查找oracle所有表中的特定列中的某些数据...

    天萃荷净 开发DBA反映,根据需求需要查找Oracle数据库中所有表中特定的列中指定的关键词的数据,和数据内容和数量 找出数据库中所有表表中REMARK列中含有WN.wind.wlr中表名和数量 de ...

  6. python按某列拆分excel表格_把一张Excel表按照固定列分成不同工作薄的小白方法...

    这是结合百度经验和论坛上的资料整理的方法,分两步,第一步是把一个完整的工作表按照某一列分解为不同的工作表.第二步是把这些工作表在分别拆为工作薄. 个人觉得这是一个相对比较简单的方法,也尝试用Pytho ...

  7. 【办公类-16-06-02】“2022下学期 总园活动室(沙水+建构)排班表(两周一次沙水)”(python 排班表系列)

    作品展示: 背景需求: 上一篇批量制作了"7天轮回14班沙水+每周固定建构"的活动室内排班表. 一.时段冲突,调整单双周. 保教主任抽空检查后,提到:"一个班.上午.下午 ...

  8. 广义表的长度和深度怎么算_最新详细个人所得税税率表!快看最新个人所得税怎么算!...

    进入2019年以后,个人所得税的起征点将由3500元提升到5000元.这对于很多纳税人来说,就意味着未来的实际收入会有所增加.现在,大家都很想知道2019年新个税税率表是什么样的.今天,为大家介绍一下 ...

  9. 大数据之-Hadoop3.x_Hadoop之HDFS_DataNode的工作机制_原理---大数据之hadoop3.x工作笔记0077

    然后我们再来看一下hadoop中,datanode的工作机制. 1.datanode1,比如启动的时候,它会向namenode进行注册,把自己的信息,比如我存了哪些block块信息, 块中存了块数据, ...

最新文章

  1. Emacs 使用graphviz-dot-mode创建架构图
  2. P4166 [SCOI2007]最大土地面积
  3. 2021-05-10 如何修改Docker的默认镜像存储位置
  4. boost::hash_combine模块实现json哈希值的测试程序
  5. 在Ubuntu X64上编译Hadoop
  6. url动态追加参数_领高舆情优化:SEO网站URL优化的方法!
  7. postman 获取接口参数_使用Postman管理API接口
  8. 推荐系统中传统模型——LightGBM + FFM融合
  9. c语言编程n元一次方程,解n元一次方程
  10. OD教程(去除NAG窗口--PE文件结构)
  11. python中断言方法举例说明_Python中断言Assertion的一些改进方案
  12. 12款绝赞的Windows软件,让你的电脑再好用10倍
  13. 云计算演义(2)企业IT之王IBM互联网之王Google数据库之王Oracle狂奔在与关闭公有云赛跑的路上(上)
  14. 2021-最新Web前端经典面试试题及答案-史上最全前端面试题(含答案)---JavaScript篇
  15. 一年级的计算机你,写电脑的一年级作文五篇
  16. 软件测试灵魂三问,如何回怼?
  17. ubuntu 1204 server xp 硬盘安装
  18. 菜鸟排版 latex + texstudio
  19. dwz 表单提交 html,DWZ文件上传表单提交
  20. 图像像素与数据量之间的关系

热门文章

  1. Redis实战11-实现优惠券秒杀下单
  2. windows php 多线程
  3. 排序算法的时间复杂度
  4. 服务器登录账号不能切换,切换LDAP服务器后用户无法登陆
  5. 【券商报告】21年1季度债券市场展望:摇摆的天平——附下载链接
  6. 全面解读商城购物app开发的开发市场现状
  7. android主流分辨率
  8. 吴祥龙-2018212756
  9. android apk存储空间不足,安卓手机内存不足别乱清理!删掉这4个文件夹,瞬间释放10个G!...
  10. 真人拳皇项目测试计划