绍兴会计继续教育网:Excel2007新知-技巧1_色彩缤纷的Data Bars
来源:
高顿网校
2014-06-27
高顿网校友情提示,*7绍兴会计继续教育网上总结信息Excel2007新知-技巧1_色彩缤纷的Data Bars等内容公布如下: Conditional Formatting Trick 1 – Multi-Coloured Data Bars
条件格式技巧1——色彩缤纷的Data Bars
A few months ago, I described the new features we have added to Excel 2007 in the area of conditional formatting. One of the new formats we added is called a “data bar” … check out this earlier post for a refresher, but the basic idea is that Excel draws a bar in each cell representing the value of that cell relative to the other cells in the selected range. Here is a shot from that post.
几个月以前,我讲述了在Excel 2007中 新增加的有关条件格式的各种特性,其中之一就是我们称之为“data bar”的……可参阅以前的文章。但是我们只讲到最基础的概念,即在一个选定的区域里面,由Excel根据不同单元格的数值对比情况,在每个单元格中绘制一个色带。下面是以前文章中的截图:
The Excel 2007 UI allows you to choose whatever colour you want for your data bars, but, by default, all the data bars you apply to a range have to be the same colour. Someone on our team recently showed me how to use a tiny bit of VBA to simulate having multiple colours of data bars on a range conditionally applied, so I thought I would pass along the trick.
Excel 2007允许你为你的data bars选择任何你想要的颜色,但是,默认情况下,同一区域中的data bars,只能有同一种颜色。最近,开发团队中的某位成员向我展示了如何在同一区域中创建多种颜色的data bars,只需要利用非常简单的VBA代码即可。所以,我想我应该好好发挥这个技巧的威力。
Say, for example, you are looking at student grades, and you want all the data bars for students with a passing mark (60%+ and above) to be green, and those with a failing grade (59% or less) to be red. The first thing you would do is to add some red data bars to your data, and then some green data bars. By default, Excel shows you the last set applied, so the data bars would be green. If you then launch the VB Editor (Alt + F11) and in the immediate window (Ctrl+G), type:
selection.FormatConditions(1).formula = "=if(c3>59, true, false)"
You would see that your data now looks like this, which makes it easy to spot the failing grades.
举个例子,你正在考虑为学生评分,你希望当学生成绩及格(60%或更高)时,data bars是绿色的,而不合格的成绩(59%或更低)对应的data bars是红色的。*9步,你肯定会为你的数据加上一些红色的data bars,然后是绿色的。在默认情况下,Excel只接受你最后的设置,所以所有的data bars都将是绿色的。如果你现在打开VB编辑器(Alt + F11),在立即窗口(Ctrl+G)中输入:selection.FormatConditions(1).formula = "=if(c3>59, true, false)"
你将会看到你的数据就会像下面这样,非常容易的辨识出不合格的成绩:
So how does this work? Every conditional format has a Formula property, which allows you to specify a formula which determines whether the conditional format is visible. In this case, we are simply saying that the green data bars (the most recent ones) should only be visible if a value is greater an 59.
This property is available on all conditional formats, so I expect that users will find all sorts of creative uses beyond just this case.
那么这项工作是如何完成的?原来,每一个条件格式都有一个公式的属性,此属性允许你指定一个公式来判断其本身是否可见。在这个例子中,我们简单的指定为,只有单元格数值大于59时,绿色的data bars才会被显示。
所有的条件格式都可以利用这个属性,因此,我希望用户能够发挥创造力,举一反三。
扫一扫微信,学习实务技巧
版权声明:本条内容自发布之日起,有效期为一个月。凡本网站注明“来源高顿教育”或“来源高顿网校”或“来源高顿”的所有作品,均为本网站合法拥有版权的作品,未经本网站授权,任何媒体、网站、个人不得转载、链接、转帖或以其他方式使用。
经本网站合法授权的,应在授权范围内使用,且使用时必须注明“来源高顿教育”或“来源高顿网校”或“来源高顿”,并不得对作品中出现的“高顿”字样进行删减、替换等。违反上述声明者,本网站将依法追究其法律责任。
本网站的部分资料转载自互联网,均尽力标明作者和出处。本网站转载的目的在于传递更多信息,并不意味着赞同其观点或证实其描述,本网站不对其真实性负责。
如您认为本网站刊载作品涉及版权等问题,请与本网站联系(邮箱fawu@gaodun.com,电话:021-31587497),本网站核实确认后会尽快予以处理。
严选名师 全流程服务
其他人还搜了
热门推荐
-
学好会计电算化的4个小技巧 2022-01-04
-
会计新手必备:金蝶财会软件使用技巧 2018-07-06
-
会计实用工具:数字大写转换(数字大写) 2017-01-19
-
最实用的会计工具:数字大写转换 2016-08-18
-
会计人必须掌握的50个常用工具 2016-08-03
-
99%的会计需要用到的30个万能公式! 2016-08-03
-
财会工作必备EXCEL 技巧,一看就知道! 2016-08-03
-
国内会计科目的词汇:成本类科目 2016-06-27
-
不同用途财政资金安排,三种税务方案巧选择 2016-06-21
-
纳税人、增值税专用发票领购簿变更程序 2016-06-17
-
填写现金支票的有哪些具体的步骤与方法 2016-06-16
-
教你学会建账流程 2016-06-15
-
UFO报表的有哪几个状态 2016-06-15
-
用友U8出纳管理步骤 2016-06-15
-
运输方式常用表达 2016-06-07
-
运输方式常用表达 2016-06-07
-
工资、薪金所得税率表 2016-06-02
-
关税复合税率表 2016-06-02
-
企业所得税税率表 2016-06-01
-
契税的税率 2016-06-01
-
企业发票专用章事宜如何办理 2016-06-01
-
辅导期纳税人取得的发票何时抵扣 2016-06-01
-
土地使用费标准 2016-05-31
-
支票填写的注意事项 2016-05-27
-
跨境人民币可以怎么用 2016-05-18
-
50套会计工作者常用公式 2016-05-18
-
人民币大写金额转换工具 2016-04-27
-
股份制企业经常会用到的会计公式 2016-03-02
-
如何从会计报表中发现税收风险 2016-02-14
-
"三证合一"后,企业注销有涉税疑点咋办? 2016-02-14
高顿项目


