Excel 資料透視表顯示的是計數而不是求和
單擊值欄位,在 Excel 中開啟“值欄位設定”並將彙總方式改為求和,在 Google Sheets 的值欄中將 Summarize by 設為 SUM。源列裡的空白、n/a 或文本數字常會讓透視表預設用計數。改完源資料後重新整理,或把欄位移出值區域再拖回去。
本文目錄
快速解答
單擊值欄位,在 Excel 中開啟“值欄位設定”並將彙總方式改為求和,在 Google Sheets 的值欄中將 Summarize by 設為 SUM。源列裡的空白、n/a 或文本數字常會讓透視表預設用計數。改完源資料後重新整理,或把欄位移出值區域再拖回去。
=COUNT(L1:L3)
=COUNTA(L1:L3)
=SUM(L1:L3)檢查重點
八行銷售樣本中,求和合計為 24450,東區為 9450;計數則是 8。2026 年 11 月 12 日在三格範圍(4800、3000 和文本 n/a)中,COUNT 為 2,COUNTA 為 3,SUM 為 7800,文本被跳過。用 =SUM(F2:F9) 與透視表對照,不要把計數字段只改成貨幣格式。
邊界與相容性
若選單裡只有計數,說明欄位被當成了文本,需先把源列轉成數字再重新新增。表頭或首行備註也可能導致計數。改完後應看到“求和項:收入”之類的標題,而不是“計數項:收入”。
完整英文範例、公式與作者備註
Excel How-toTested in:
COUNT,COUNTAandSUMon a mixed range, and the eight-row sales totals, were evaluated in Google Sheets on 12 November 2026. Excel 365 menu names are the current desktop labels; I did not click through Value Field Settings in Excel this session.
If you do not have a pivot yet, start with How to Create a Pivot Table in Excel. If the totals are stale rather than counted, see pivot table not refreshing.
What a Count total looks like
On the eight-sale sample used elsewhere on this site, a Sum of Revenue is 24450, and East is 9450. A Count of the same field is 8 — one per row. If your “grand total” is a small whole number that matches the number of records, you are looking at a count, not at money.
In Google Sheets on 12 November 2026 I put 4800, 3000 and the text n/a in a three-cell range:
=COUNT(L1:L3)
=COUNTA(L1:L3)
=SUM(L1:L3)
Those returned 2, 3, and 7800. COUNT sees only the two numbers. COUNTA sees all three cells. SUM over the range added the two numbers and skipped the text, which is what you want for a revenue total — but a pivot that sniffed the text in that column may still have placed the field in Values as Count.
(If you write =SUM(4800,3000,"n/a") with the text as an argument rather than a cell, Google Sheets returns #VALUE!. The range form is the one that matches a source column.)
How to switch the field to Sum
In Excel 365
- Click any number in the Values area, or click the field in the Values well.
- Open Value Field Settings (from the field’s menu, or by right-clicking a value cell and choosing Value Field Settings).
- Under Summarize value field by, choose Sum.
- Click OK. The caption should change from “Count of Revenue” to “Sum of Revenue.”
In Google Sheets
- Click the pivot to open the editor.
- In Values, find the field.
- Set Summarize by to SUM.
If the menu offers only Count, the field is being treated as text. Convert the source column to numbers first, then re-add the field; see convert text to numbers.
Clean the source so it stays on Sum
Look down the Revenue column (or whatever you are summing) for blanks, apostrophes in front of numbers, spaces, currency symbols that were pasted as text, and placeholders such as n/a or -. Replace placeholders with a real 0 if zero is the right amount, or leave the cell empty only if that row should not be in the list. Then refresh the pivot, or remove the field from Values and drag it back in.
A header that Excel misreads, or a leftover note in the first data row, can also push the field into Count. Keep a single header row and numbers only underneath.
Once Values says Sum, check it against the sheet: =SUM(F2:F9) should be 24450 on the sample, and =SUMIFS(F2:F9,B2:B9,"East") should be 9450. If the pivot is still at 8, you changed the wrong field, or a filter is hiding rows, or you are still on Count.
Do not format a Count as currency and hope it will start adding. The summary function, not the number format, decides whether the pivot counts or sums.