Skip to main content

創建百分比堆疊柱狀圖

Author: Xiaoyang Last Modified: 2025-05-13

在 Excel 中,我們很容易創建帶有數據值標籤的堆疊柱狀圖。但是,有時候您可能需要的是帶有百分比值而不是普通值的堆疊柱狀圖,並在每個柱形圖的頂部顯示總值,如下方截圖所示。那麼,如何在 Excel 中創建這種類型的圖表呢?

stacked column chart with percentage


創建帶有百分比值的堆疊柱狀圖

為了在堆疊柱狀圖中同時顯示總值和百分比值,請按照以下步驟操作:

1. 首先,請計算每列數據的總值,在單元格 B6 中輸入以下公式,然後拖動填滿控制柄從右側應用公式到其他單元格,請參見截圖:

=SUM(B2:B5)

steps of creating a tacked column chart with percentage in Excel

2. 然後,您應該分別計算每個產品值的百分比,請將以下公式應用於單元格 B9,然後拖動填滿控制柄到其他單元格以計算百分比值。請參見截圖:

=B2/B$6

steps of creating a tacked column chart with percentage in Excel

3. 現在,您需要將小數值轉換為百分比值,請選擇公式單元格,然後點擊「Home」> 從「General」下拉列表中選擇「Percentage」,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

4. 現在,選擇包括總值單元格的原始數據,然後點擊「Insert」> 「Insert Column or Bar Chart」> 「Stacked Column」,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

5. 已插入一個堆疊圖表,如下方截圖所示:

steps of creating a tacked column chart with percentage in Excel

6. 點擊選擇圖表,然後點擊「Design」> 「Switch Row/Column」,您將獲得如下方截圖所示的圖表:

steps of creating a tacked column chart with percentage in Excel

7. 然後,您可以從圖表中刪除不需要的元素,例如圖表標題、網格線,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

8. 接著,點擊選擇圖表,並點擊「Chart Elements」圖標以展開「Chart Elements」列表框,在列表框中,勾選「Data Labels」以插入數據標籤,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

9. 然後,點擊選擇總系列數據,然後右鍵單擊,從上下文菜單中選擇「Change Series Chart Type」,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

10. 在彈出的「Change Chart Type」對話框中,在「Choose the chart type and axis for your data series」列表框中,為「Total」數據系列選擇「Line」圖表類型,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

11. 然後點擊「OK」按鈕關閉對話框,圖表已顯示如下方截圖所示:

steps of creating a tacked column chart with percentage in Excel

12. 然後,右鍵單擊該線條,並從「Outline」下拉列表中選擇「 No Outline」以隱藏圖表中的線條,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

13. 然後,點擊選擇總數據值,然後點擊「Chart Elements」以展開列表框,在 「Chart Elements」列表框中,從「Data Labels」下拉列表中選擇「Above」,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

14. 從現在開始,您應該將數據值轉換為百分比值,請右鍵單擊第一個系列數據標籤(梨子的數據標籤,金色條形中的數據),並選擇「 Format Data Labels」,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

15. 在打開的「Format Data Labels」窗格中,在「Label Options」標籤下,勾選「Value From Cells」,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

16. 在彈出的「Data Label Rage」對話框中,選擇與數據系列一致的百分比值(梨子的百分比值),請參見截圖:

steps of creating a tacked column chart with percentage in Excel

17. 然後點擊「OK」關閉對話框,仍在「Format Data Labels」窗格中,取消勾選「Label Options」部分中的「Value」框,僅在圖表中顯示百分比值,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

注意:如果您想將數據值和百分比值都作為數據標籤顯示,請勾選「Value」選項,然後從「Separator」下拉列表中選擇「(New Line)」,請參見截圖:
steps of creating a tacked column chart with percentage in Excel

18. 然後,您只需重複上述步驟 14-17 將其他數據值轉換為其各自的百分比值,您將獲得所需的圖表,請參見截圖:

steps of creating a tacked column chart with percentage in Excel

19. 最後,根據需要格式化圖例,並刪除「Total」圖例。帶有百分比值的堆疊圖表已成功創建,請參見截圖:

steps of creating a tacked column chart with percentage in Excel


使用驚人功能創建帶有百分比值的堆疊柱狀圖

Kutools for Excel 提供了數十種 Excel 沒有的特殊類型圖表,例如子彈圖目標與實際圖差值箭頭圖等。通過其便捷工具——百分比堆疊圖,您可以輕鬆創建帶有百分比值和總值的堆疊圖。點擊免費試用 Kutools for Excel!


下載百分比堆疊柱狀圖範例文件

sample of creating a tacked column chart with percentage in Excel


視頻:創建帶有百分比值的堆疊柱狀圖


最佳的辦公生產力工具

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 一樣。