跳到主要內容

根據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:通過使用方便的工具根據值更改圖表顏色

有時,使用公式創建圖表可能會導致一些錯誤,而公式是錯誤的或已刪除。 現在 按值更改圖表顏色 的工具 Excel的Kutools 可以幫你。

Excel的Kutools, 與以上 300 方便的功能,使您的工作更加輕鬆。 

免費安裝 Kutools for Excel,請執行以下操作:

1。 點擊 庫工具 > 圖表 > 按值更改圖表顏色。 看截圖:
doc按值7更改圖表顏色

2.在彈出的對話框中,執行以下操作:

1)選擇所需的圖表類型,然後分別選擇軸標籤和系列值(列標題除外)。
doc按值8更改圖表顏色

2)然後點擊 加入 按鍵 doc添加按鈕 根據需要添加值範圍。
doc按值9更改圖表顏色

3)重複上述步驟,將所有值範圍添加到 群組 清單。 然後點擊 Ok.
doc按值10更改圖表顏色
doc按值11更改圖表顏色

尖端:

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