Skip to main content

在 Excel 中創建帶有百分比變化的柱狀圖

Author: Xiaoyang Last Modified: 2025-05-12

在 Excel 中,您通常可以創建一個簡單的柱狀圖來查看數據趨勢。為了使數據看起來更直觀地顯示年份之間的差異,您可以創建一個帶有每個柱狀之間百分比變化的柱狀圖,如下圖所示。在此類型的圖表中,向上箭頭表示後一年比前一年增長的百分比,而向下箭頭則表示減少的百分比。

本文將介紹如何在 Excel 中創建一個顯示柱狀之間百分比變化的柱狀圖。

steps of creating a column chart with percentage change by using error barsa column chart with percentage change


使用誤差線創建帶有百分比變化的柱狀圖

使用誤差線創建帶有百分比變化的柱狀圖時,您應該插入一些輔助列,如下方數據所示,然後根據輔助數據創建圖表。請按照以下步驟操作:

steps of creating a column chart with percentage change by using error bars

首先,創建輔助列數據

1. 在原始數據旁邊的單元格 C2 中輸入以下公式,然後將公式拖動到單元格 C10,見截圖:

=A2&REPT(" ",10)
提示:此公式用於使標籤更長並將文本向左移動。否則,標籤將位於可見和不可見柱狀條中心的下方。

steps of creating a column chart with percentage change by using error bars

2. 繼續在單元格 D2 中輸入以下公式,然後將公式拖動並複製到單元格 D10,見截圖:

=B2
提示:此公式引用了 B 列中的順序號碼。

steps of creating a column chart with percentage change by using error bars

3. 然後,在單元格 E2 中輸入以下公式,然後將填充柄向下拖動到單元格 E9,見截圖:

=B3
提示:此公式用於引用下一年的訂單數量。它將用於不可見的柱狀條,這些柱狀條是誤差線的頂部或基準。

steps of creating a column chart with percentage change by using error bars

4. 接下來,請在單元格 F2 中輸入以下公式,然後將填充柄向下拖動到單元格 F9,見截圖:

=B3-B2
提示:此公式將計算當年與下一年之間的差異或變化。

steps of creating a column chart with percentage change by using error bars

5. 繼續在單元格 G2 中輸入以下公式,並拖動到單元格 G9,見截圖:

=IF(F2>0,-F2,"")
提示:此公式用於返回正值的差異值,並且會顯示一些負數,這將用於誤差線從不可見柱狀條的頂端開始並向下延伸。

steps of creating a column chart with percentage change by using error bars

6. 然後,繼續在單元格 H2 中輸入以下公式,並將該公式複製到單元格 H9,見截圖:

=IF(F2<0,F2,"")
提示:此公式用於返回負值的差異值,並且會顯示一些負數,這將用於誤差線從誤差線的底部開始並向上延伸。

steps of creating a column chart with percentage change by using error bars

7. 現在,插入最後一個輔助列,請將以下公式應用於單元格 I2,並拖動到單元格 I9,然後將小數結果格式化為百分比樣式。見截圖:

=F2/B2
提示:此公式計算前一年與下一年之間的差異百分比。它將作為誤差線下方不可見柱狀圖上的標籤。

steps of creating a column chart with percentage change by using error bars

其次,根據輔助列數據創建圖表

8. 創建輔助數據後,選擇 C 列、D 列和 E 列中的數據,然後點擊 插入 > 插入柱狀圖或條形圖 > 簇狀柱狀圖,見截圖:

steps of creating a column chart with percentage change by using error bars

9. 然後,插入了一個柱狀圖,您可以刪除圖表中不需要的元素,例如圖表標題、圖例或網格線,見截圖:

steps of creating a column chart with percentage change by using error bars steps of creating a column chart with percentage change by using error bars steps of creating a column chart with percentage change by using error bars

10. 然後,點擊顯示不可見數據的柱狀條,然後點擊圖表元素按鈕以展開圖表元素列表框,並選擇誤差線 > 更多選項,見截圖:

steps of creating a column chart with percentage change by using error bars

11. 在打開的 格式化誤差線 面板中,位於 誤差線選項 標籤下:

  • 方向 部分選擇 兩側
  • 結束樣式 選擇 帽子
  • 誤差量 選擇 自定義,然後點擊 指定值,在隨後出現的 自定義誤差線 對話框中,選擇 G2:G10 單元格到 正誤差值 框中,然後選擇 H2:H10 單元格到 負誤差值 框中。
steps of creating a column chart with percentage change by using error bars steps of creating a column chart with percentage change by using error bars steps of creating a column chart with percentage change by using error bars

12. 然後,點擊 確定 按鈕,您將獲得如下截圖所示的圖表:

steps of creating a column chart with percentage change by using error bars

13. 現在,右鍵點擊顯示 Order 1 數據的柱狀條,並從上下文菜單中選擇 格式化數據系列,見截圖:

steps of creating a column chart with percentage change by using error bars

14. 在打開的 格式化數據系列 面板中,位於 系列選項 標籤下,將 系列重疊間距寬度 部分的值更改為 0%,見截圖:

steps of creating a column chart with percentage change by using error bars

15. 現在,您應該隱藏不可見的數據條,右鍵點擊其中任意一條,在彈出的上下文菜單中,從 填充 部分選擇 無填充,見截圖:

steps of creating a column chart with percentage change by using error bars

16. 在仍然選中不可見數據條的情況下,點擊 圖表元素 按鈕,選擇 數據標籤 > 更多選項,見截圖:

steps of creating a column chart with percentage change by using error bars

17. 在 格式化數據標籤 面板中,位於 標籤選項 標籤下,勾選 從單元格獲取值,然後在彈出的 數據標籤範圍 提示中,選擇方差數據範圍 I2:I9,見截圖:

steps of creating a column chart with percentage change by using error bars steps of creating a column chart with percentage change by using error bars steps of creating a column chart with percentage change by using error bars

18. 然後點擊 確定,仍然在 格式化數據標籤 面板中:

  • 取消勾選 標籤選項 下的 顯示引導線 選項;
  • 然後從標籤位置指定標籤位置為 外側末端

steps of creating a column chart with percentage change by using error bars

19. 現在,您可以看到數據標籤已經添加到圖表中,您可以將負百分比標籤設置為 內側末端,並根據需要格式化數據標籤,見截圖:

steps of creating a column chart with percentage change by using error bars


使用上下箭頭創建帶有百分比變化的柱狀圖

有時候,您可能想用一些箭頭來替換誤差線,如果下一年數據增加,則顯示向上箭頭,如果下一年數據減少,則顯示向下箭頭。同時,數據標籤和箭頭會隨著數據的變化而動態改變,如下方演示所示。

steps of creating a column chart with percentage change by using up down arrows

要創建這種類型的圖表,您應該插入兩部分輔助數據,如下截圖所示。第一部分計算方差和百分比方差,如藍色部分所示,第二部分用於自定義誤差線的增加和減少,如紅色部分所示。

steps of creating a column chart with percentage change by using up down arrows

首先,創建輔助列數據

1. 要插入第一部分輔助數據,請應用以下公式:

C2: =REPT(A2,1)        (將公式拖動到單元格 C10)


D2
: =B2                       (將公式拖動到單元格 D10)
E2: =B3-B2                 (將公式拖動到單元格 E9)
F2: =E2/B2                  (將公式拖動到單元格 F9)

steps of creating a column chart with percentage change by using up down arrows

2. 然後應用以下公式來創建第二部分輔助數據:

G2: 輸入 1.5, 2.5, 3.5, 4.5…每次加一到前一個單元格。          (填入數據從 G2 到 G9)


H2
: =IF(B3>=B2,B3,NA())                                                                (將公式拖動到單元格 H9)
I2: =IF(B3<B2,B3,NA())                                                                    (將公式拖動到單元格 I9)

steps of creating a column chart with percentage change by using up down arrows

其次,根據輔助列數據創建圖表

3. 選擇 C 列和 D 列中的數據,然後點擊 插入 > 插入柱狀圖或條形圖 > 簇狀柱狀圖 以插入柱狀圖,如下截圖所示:

steps of creating a column chart with percentage change by using up down arrows

4. 然後,按下 Ctrl + C 複製 G 列、H 列、I 列中的數據,然後點擊選擇圖表,見截圖:

steps of creating a column chart with percentage change by using up down arrows

5. 選擇圖表後,請點擊 首頁 > 粘貼 > 選擇性粘貼,在 選擇性粘貼 對話框中,選擇 新系列列選項,然後勾選 系列名稱在第一行分類(X 標籤)在第一列 選項,見截圖:

steps of creating a column chart with percentage change by using up down arrows steps of creating a column chart with percentage change by using error bars steps of creating a column chart with percentage change by using up down arrows

6. 然後,您將獲得如下截圖所示的圖表:

steps of creating a column chart with percentage change by using up down arrows

7. 右鍵點擊圖表中的任意一個柱狀條,然後從上下文菜單中選擇 更改系列圖表類型,見截圖:

steps of creating a column chart with percentage change by using up down arrows

8. 在 更改圖表類型 對話框中,將 增加減少 都更改為 散點圖,然後取消勾選 選擇您的系列的圖表類型和軸 列表框中每個系列的 次坐標軸 框。見截圖:

steps of creating a column chart with percentage change by using up down arrows

9. 然後,點擊 確定 按鈕,您將獲得一個組合圖,標記位於各自柱狀之間。見截圖:

steps of creating a column chart with percentage change by using up down arrows

10. 然後,請點擊選擇 增加 系列(橙色點),然後點擊 圖表元素 按鈕,從列表框中勾選 誤差線,誤差線已添加到圖表中,見截圖:

steps of creating a column chart with percentage change by using up down arrows

11. 選擇水平誤差線並按 Delete 鍵刪除它們,見截圖:

steps of creating a column chart with percentage change by using up down arrows

12. 然後,選擇垂直誤差線,右鍵點擊它,並選擇 格式化誤差線,在 格式化誤差線 面板中,位於 誤差線選項 標籤下,進行以下操作:

  • 方向 選擇 兩側
  • 結束樣式 選擇 無帽
  • 誤差量 部分,選擇 自定義,然後點擊 指定值 按鈕,在彈出的 自定義誤差線 對話框中,在 正誤差值 框中輸入 ={0},在 負誤差值 框中選擇方差值 E2:E9。
  • 然後,點擊 確定 按鈕。
steps of creating a column chart with percentage change by using up down arrows steps of creating a column chart with percentage change by using up down arrows steps of creating a column chart with percentage change by using up down arrows

13. 現在,仍然在 格式化誤差線 面板中,點擊 填充與線條 標籤,進行以下操作:

  • 線條 部分選擇 實線 並選擇您需要的顏色,然後指定您需要的線寬;
  • 開始箭頭類型 下拉列表中,選擇一種 箭頭類型

steps of creating a column chart with percentage change by using up down arrows

14. 在這一步中,您應該隱藏標記(橙色點),選擇橙色點,右鍵點擊,選擇 格式化數據系列,打開的 格式化數據系列 面板中,位於 填充與線條 標籤下,點擊 標記 部分,然後從 標記選項 中選擇 ,見截圖:

steps of creating a column chart with percentage change by using up down arrows

15. 重複上述步驟 10-14 插入減少數據系列的向下箭頭並隱藏灰色標記,您將獲得如下截圖所示的圖表:

steps of creating a column chart with percentage change by using up down arrows

16. 插入箭頭後,現在,您應該添加數據標籤,請點擊選擇隱藏的增加系列,然後點擊 圖表元素 > 數據標籤 > 上方,見截圖:

steps of creating a column chart with percentage change by using up down arrows

17. 然後,右鍵點擊任何數據標籤,並從上下文菜單中選擇 格式化數據標籤,在展開的 格式化數據標籤 面板中,位於 標籤選項 標籤下,勾選 從單元格獲取值 選項,然後,在彈出的 數據標籤範圍 對話框中,選擇方差百分比單元格 (F2:F9),見截圖:

steps of creating a column chart with percentage change by using up down arrows steps of creating a column chart with percentage change by using eup down arrows steps of creating a column chart with percentage change by using up down arrows

18. 點擊 確定 關閉對話框,仍然在 格式化數據標籤 面板中,取消勾選 Y 值顯示引導線 選項,見截圖:

steps of creating a column chart with percentage change by using up down arrows

19. 然後,您只需重複上述步驟 16-18 添加負百分比標籤(這次,您應該在減少數據點下方添加標籤,在 圖表元素數據標籤 子菜單中選擇 下方),帶有百分比變化的柱狀圖就成功創建了,見截圖:

steps of creating a column chart with percentage change by using up down arrows


使用強大功能創建帶有百分比變化的柱狀圖

對於大多數人來說,上述方法太難使用,但是,如果您擁有 Kutools for Excel,它提供了多種 Excel 不具備的特殊類型圖表,例如 子彈圖目標與實際圖斜率圖等。通過其易用工具 - 帶有百分比變化的柱狀圖,您可以快速輕鬆地使用上下箭頭在 Excel 中創建帶有百分比變化的柱狀圖。點擊免費試用 Kutools for Excel!


下載帶有百分比變化的柱狀圖範例文件

sample of creating a column chart with percentage change


最佳的辦公生產力工具

Kutools for Excel - 幫助您脫穎而出

? Kutools AI 助手:基於智能執行生成代碼創建自訂公式分析數據並生成圖表調用 Kutools 函數…來徹底改變數據分析方式。
熱門功能查找、標記或識別重複值  |  刪除空行  |  合併列或單元格而不丟失數據  |  四捨五入無需公式 ...
超級 VLookup多條件  |  多值  |  跨多工作表  |  模糊查找...
高級下拉列表簡易下拉列表  |  依賴下拉列表  |  多選下拉列表...
列管理器添加特定數量的列  |  移動列  |  切換隱藏列的可見狀態  比較列以選擇相同和不同的單元格 ...
特色功能網格聚焦  |  設計檢視  |  增強編輯欄  |  工作簿與工作表管理器 | 資源庫(自動文本)  |  日期提取器  |  合併資料  |  加密/解密儲存格  |  按清單發送電子郵件  |  超級篩選  |  特殊篩選(篩選粗體/斜體/刪除線...) ...
頂級 15 種工具集12 個文字工具添加文本刪除特定字符 ...)  |  50+ 圖表 類型甘特圖 ...)  |  40+ 實用 公式基於生日計算年齡 ...)  |  19 個插入工具插入QR碼從路徑插入圖片 ...)  |  12 個轉換工具金額轉大寫匯率轉換 ...)  |  7 個合併與分割工具高級合併行分割Excel單元格 ...)  |  ... 還有更多

Kutools for Excel 擁有超過 300 種功能,確保您需要的功能只需點擊一下即可實現...


Office Tab - 啟用 Microsoft Office(包括 Excel)中的分頁閱讀和編輯功能

  • 一秒鐘內在數十個打開的文檔之間切換!
  • 每天為您減少數百次鼠標點擊,告別滑鼠手。
  • 當查看和編輯多個文檔時,您的工作效率提高 50%。
  • 為 Office(包括 Excel)帶來高效的分頁功能,就像 Chrome、Edge 和 Firefox 一樣。