Fix Excel PivotTable Cannot Change Count to Sum for External Data
Question details
The user is unable to change a PivotTable value field from Count to Sum when using external data, often receiving an error indicating the field contains text data.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Creating or updating a PivotTable using data referenced from an external source workbook.
- Observed behavior
- The PivotTable defaults to Count and throws an error when attempting to change the summarization to Sum, even if the data appears numeric and works correctly in its original source workbook.
Ensure you have edit access to the external source workbook, as you will need to clean the original data fields before refreshing the PivotTable connection.
Clean and Convert Source Data to Numbers
Resolve the issue by ensuring all values in the external source column are strictly formatted as numbers and clearing out any hidden text formats.
When importing external data, Excel strictly evaluates the data types. If a column contains numbers stored as text, hidden spaces, or blank cells formatted as text, the external connection may classify the entire field as text. This prevents the PivotTable from calculating a Sum.
Open the external Excel workbook that contains the original source data for your PivotTable.
Highlight the entire column containing the values you want to summarize by Sum.
Go to the Data tab on the ribbon and click 'Text to Columns'. Click 'Finish' immediately in the wizard to force Excel to re-evaluate the cells as numbers.
If the issue persists, press Ctrl+H to open Find and Replace. Type a single space in the 'Find what' box, leave 'Replace with' blank, and click 'Replace All'.
Save and close the source workbook. Return to your main PivotTable file, go to the Data tab, and click 'Refresh All' to update the external data connection.

Use WPS Spreadsheet for Seamless Data Summarization
WPS Spreadsheet provides powerful and intuitive PivotTable features, allowing you to easily summarize external or internal data, switch between Count and Sum, and seamlessly convert text to numbers without complex formatting errors.
- 1. Open your data file: Launch WPS Spreadsheet and load your data source or establish your external data connection.
- 2. Convert text to numbers: Highlight your value column, click the smart error indicator if present, and select 'Convert to Number'.
- 3. Insert a PivotTable: Navigate to the Insert tab, select 'PivotTable', and confirm your data range to create the table.
- 4. Change field settings to Sum: Drag your data field to the Values area, click the drop-down arrow next to it, select 'Value Field Settings', and choose 'Sum'.

Frequently Asked Questions
Why does my PivotTable automatically default to Count instead of Sum?
A PivotTable defaults to Count if the source data column contains any non-numeric data. This includes blank cells, text values, numbers stored as text, or even hidden spaces.
How do I find hidden text values in a large dataset?
You can use the ISNUMBER() function in an adjacent helper column. It will return FALSE for any cell that Excel is interpreting as text. You can then filter this helper column to isolate and fix the problematic cells.
Why does the PivotTable work fine in the source file but fail as external data?
When referencing external data, Excel relies on data connection drivers that strictly evaluate column types. If the connection driver detects mixed data types during its initial scan, it may lock the entire field as text, forcing the external PivotTable to use Count, even if the native workbook handles it normally.




