跳到主要内容

根据Excel中的值更改图表颜色

有时,当您插入图表时,您可能希望在图表中以不同的颜色显示不同的值范围。 例如,当值范围为0-60时,系列颜色显示为蓝色,如果71-80,则显示灰色,如果81-90显示为黄色,以此类推,如下图所示。 现在,本教程将为您介绍基于Excel中的值更改图表颜色的方法。
doc按值1更改图表颜色

根据值更改柱形图/条形图颜色
方法1:通过使用公式和内置图表功能,根据值更改条形字符的颜色
方法2:通过使用方便的工具根据值更改条形字符的颜色

根据值更改折线图颜色

下载样本文件


根据值更改柱形图/条形图颜色

方法1通过使用公式和内置图表功能,根据值更改条形字符的颜色

首先,您需要创建如下所示的屏幕截图所示的数据,列出每个值范围,然后在数据旁边插入值范围作为列标题。
doc按值2更改图表颜色

1.在单元格C5中,键入此公式

=IF(AND(C$1<=B5,$B5<=C$2),$B5,"")

然后向下拖动填充手柄以填充单元格,然后继续向右拖动手柄。
doc按值3更改图表颜色

2.然后选择列名,按住 按Ctrl 键,选择包含值范围标题的公式单元格。
doc按值4更改图表颜色

3。 单击 插页 > 插入柱形图或条形图, 选择 聚集列 or 集群栏 如你所需。
doc按值5更改图表颜色

然后插入了图表,并且图表的颜色根据该值而有所不同。
doc按值6更改图表颜色

方法2:通过使用方便的工具根据值更改图表颜色

有时,使用公式创建图表可能会导致一些错误,而公式是错误的或已删除。 现在 按值更改图表颜色 的工具 Kutools for Excel 可以帮你。

Kutools for Excel, 与超过 300 方便的功能,使您的工作更加轻松。 

免费安装 Kutools for Excel,请执行以下操作:

1。 点击 库工具 > 图表 > 按值更改图表颜色。 看截图:
doc按值7更改图表颜色

2.在弹出的对话框中,执行以下操作:

1)选择所需的图表类型,然后分别选择轴标签和系列值(列标题除外)。
doc按值8更改图表颜色

2)然后点击 地址 按键 doc添加按钮 根据需要添加值范围。
doc按值9更改图表颜色

3)重复上述步骤,将所有值范围添加到 团队 清单。 然后点击 Ok.
doc按值10更改图表颜色
doc按值11更改图表颜色

Tips::

1.您可以双击列或栏以显示 格式化数据点 窗格以更改颜色。

2.如果之前已插入柱形图或条形图,则可以应用此工具- 按值的颜色表 根据值更改图表的颜色。

选择条形图或柱形图,然后单击 库工具 > 图表 > 按值的颜色表。 然后在弹出的对话框中,根据需要设置值范围和相对颜色。 点击免费下载!
按值的颜色表


根据值更改折线图颜色

如果要基于值插入具有不同颜色的折线图,则需要另一个公式。

首先,您需要创建如下所示的屏幕截图所示的数据,列出每个值范围,然后在数据旁边插入值范围作为列标题。

备注:系列值必须从A到Z排序。
doc按值12更改图表颜色

1.在单元格C5中,键入此公式

=IF(AND(C$1<=$B5,$B5<=C$2),$B5,NA())

然后向下拖动填充手柄以填充单元格,然后继续向右拖动手柄。
doc按值13更改图表颜色

3.选择数据范围,包括值范围标题和公式单元格,请参见屏幕截图:
doc按值14更改图表颜色

4。 单击 插页 > 插入折线图或面积图, 选择 Line 类型。
doc按值15更改图表颜色

现在,折线图已通过值用不同的颜色线创建。
doc按值16更改图表颜色


下载样本文件

点击下载示例文件


与图表有关的其他操作(文章)

Excel图表上的动态突出显示数据点
如果一个图表上有多个序列,并且在上面绘制了很多数据,则将很难读取或仅找到一个序列中使用的相关数据。

在Excel中创建带有系列选择复选框的交互式图表
在Excel中,我们通常插入一个图表以更好地显示数据,有时,该图表具有多个系列选择。 在这种情况下,您可能希望通过选中复选框来显示系列。

Excel中的条件格式堆积条形图
本教程介绍了如何创建条件格式的堆积条形图,如下图在Excel中逐步显示的屏幕截图。

逐步在Excel中创建实际与预算图表
本教程介绍了如何创建条件格式的堆积条形图,如下图在Excel中逐步显示的屏幕截图。


  • 超级公式栏 (轻松编辑多行文本和公式); 阅读视图 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 和保存数据; 拆分单元格内容; 合并重复的行和总和/平均值...防止细胞重复; 比较范围...
  • 选择重复或唯一 行; 选择空白行 (所有单元格都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择...
  • 确切的副本 多个单元格,无需更改公式参考; 自动创建参考 到多张纸; 插入项目符号,复选框等...
  • 收藏并快速插入公式,范围,图表和图片; 加密单元 带密码 创建邮件列表 并发送电子邮件...
  • 提取文字,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级筛选 (将过滤方案保存并应用于其他工作表); 高级排序 按月/周/日,频率及更多; 特殊过滤器 用粗体,斜体...
  • 结合工作簿和工作表; 根据关键列合并表; 将数据分割成多个工作表; 批量转换xls,xlsx和PDF...
  • 数据透视表分组依据 周号,周几等 显示未锁定的单元格 用不同的颜色 突出显示具有公式/名称的单元格...
kte选项卡201905
  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
officetab底部
Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Dear sir,
Here I have the daily workers efficiency. Now I need the column chart in a conditional formatting method. I want the graph in a different colors as per the average efficiency. Can you give me the solution?
This comment was minimized by the moderator on the site
Is there anyway I can do this to an already existing graph that a colleague made? For example, I'm tracking how productive people are and want anything 95%-105% to be green and anything else to be red; at the moment, anything 100%+ is green and anything below is red.
This comment was minimized by the moderator on the site
In the "change bar color based on value example", consider using the stacked bar chart as all the columns then will be centred on the x axis label.
This comment was minimized by the moderator on the site
how do I remove the zeroes at the ends of the bars when I choose "show values" for the bars?
This comment was minimized by the moderator on the site
Sorry, I did not understand your question. Your data is number or a formula result needed to be remove trailing zeros? Or if you just want to remove zeros after decimal point, this tutorial can help you https://www.extendoffice.com/documents/excel/3621-excel-remove-zeros-after-decimal.html
This comment was minimized by the moderator on the site
Re "Change bar chart color based on value" many thanks - I suggest using stacked bars or columns not clustered, then all the bars come evenly spaced even when they have different colors.
This comment was minimized by the moderator on the site
Extremely helpful, but I'm struggling to get it to work where there is just one data point that should be a different colour. Can you help?
This comment was minimized by the moderator on the site
Greetings This does not seem to work in Excel 2016 for Mac. All I get are Colored Horizontal Lines for each X Axis Observation instead of a Multicolored Line Chart. Please help.
This comment was minimized by the moderator on the site
Very helpful. Thank you. But have one query - How do you customise the colours ?
This comment was minimized by the moderator on the site
Go home Go home Go home
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations