Pivot Table Issues

How to Fix Duplicate Items in Excel Pivot Tables

Elise WilliamsElise Williams Nov 10, 2026 869 views

Question details

The Pivot Table displays duplicate entries for seemingly identical items due to invisible spaces or non-printing characters in the source data.

How to Fix Duplicate Items in a Pivot Table
Product
Spreadsheet
Device & OS
not provided
Scenario
Grouping, summarizing, and analyzing data using a Pivot Table.
Observed behavior
Two or more identical-looking items appear as separate rows or columns in the Pivot Table because of hidden formatting differences.
Before you start

Ensure you have access to the original source data table connected to your Pivot Table, as fixing this issue requires modifying and cleaning the raw data.

Solution 1Recommended

Clean Source Data with TRIM and CLEAN Formulas

Use spreadsheet formulas to strip out invisible spaces and non-printing characters from your source data.

Duplicate items that look exactly the same usually differ by a trailing space or a hidden non-printable character. The best way to resolve this is by standardizing the text in your source data.

1
Insert a helper column

Navigate to your source data sheet and insert a new blank column directly next to the column containing the duplicate values.

2
Apply the cleaning formula

In the first cell of the new column, enter the formula =TRIM(CLEAN(A2)) (assuming A2 is the first cell with data) and press Enter.

3
Fill the entire column

Click the small square at the bottom right corner of the cell and drag it down to apply the formula to all rows.

4
Paste as values

Copy the newly cleaned data. Right-click the original data column, select 'Paste Special', and choose 'Values' to overwrite the uncleaned text.

5
Refresh the Pivot Table

Go back to your Pivot Table, right-click anywhere inside it, and select 'Refresh'. The duplicate items will now merge into a single entry.

Clean Source Data with TRIM and CLEAN Formulas
Handling Non-Breaking Spaces: If =TRIM(CLEAN()) doesn't work, your data might contain non-breaking spaces (common in web exports). Use =TRIM(SUBSTITUTE(A2, CHAR(160), " ")) instead.
Manage Data Effectively

Clean Data and Build Pivot Tables in WPS Spreadsheet

WPS Spreadsheet provides powerful data cleaning formulas like TRIM and CLEAN, along with robust Pivot Table features to analyze your data accurately without duplicate glitches.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your data.
  2. 2. Clean the text: Use the =TRIM() or =CLEAN() formulas to standardize your text and remove hidden spaces.
  3. 3. Insert a Pivot Table: Select your cleaned data, navigate to the 'Insert' tab on the top ribbon, and click 'PivotTable'.
  4. 4. Analyze without duplicates: Drag and drop your fields to create a precise, duplicate-free summary of your data.
Advanced Pivot Table functionality identical to Microsoft Excel.Full compatibility with Microsoft Excel (.xlsx) formats and formulas.Built-in data cleaning tools to easily manage large datasets.Free and lightweight, running smoothly on Windows, Mac, and Linux.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the TRIM function remove all spaces?

The TRIM function removes standard spaces (character code 32), but often data exported from websites contains non-breaking spaces (character code 160). You can remove these by using the SUBSTITUTE function combined with TRIM: =TRIM(SUBSTITUTE(A2, CHAR(160), " ")).

Do I need to recreate my Pivot Table after cleaning the source data?

No, you do not need to recreate it. Once you have corrected the source data, simply right-click anywhere inside the Pivot Table and select 'Refresh'. The duplicate items will automatically merge.

Can formatting differences cause duplicate items in a Pivot Table?

No, visual formatting like bold text, italics, or different font colors will not cause duplicates. Pivot Tables only differentiate items based on the actual underlying cell value or text string.