Power Query Problems

Find or Remove Duplicate Rows in a Large Excel Table with WPS Office Power Query

Phi Hung VoPhi Hung Vo Nov 13, 2026 869 views

Question details

The user needs to find or remove duplicate rows in a large Excel table where the first two name columns define duplicates, but the complete 10-column rows must be kept.

Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
A large table contains 10 columns; duplicate variations in the first and last name columns make exact row deduplication unreliable, and the user wants separate unique and duplicate result sets.
Observed behavior
Duplicate rows may be missed or incorrectly matched because name fields contain extra spaces, hidden characters, inconsistent capitalization, or punctuation differences such as "DA - VINCI" vs "DA-VINCI".
Before you start

Open the workbook in WPS Spreadsheets and verify that the table has a clear header row. Keep the original data intact on a Source sheet so you can compare the unique and duplicate outputs after the query runs.

Solution 1Recommended

Use Power Query to clean name columns and remove duplicate rows

Best for large tables and inconsistent data because Power Query applies Trim, Clean, and consistent capitalization before duplicate detection while keeping all 10 columns.

Power Query treats values like "DA - VINCI" and "DA-VINCI" as different because punctuation and hidden characters are part of the text. Cleaning the key columns first reduces false mismatches, but you should still review remaining variations separately.

1
Open the Power Query editor

In WPS Spreadsheets, click inside the table, go to the Data tab, and choose From Table/Range in the Power Query group. Confirm the range has headers and click OK.

2
Trim and clean the name columns

Select the first name column, right-click the header, and choose Transform > Trim. Repeat for the last name column, then use Transform > Clean to remove non-printable characters.

3
Standardize capitalization

Right-click the last name column and choose Transform > Capitalize Each Word. Apply the same formatting option to the first name column so both key columns are consistent.

4
Remove duplicates on the two key columns

Select the first name column, hold Ctrl and select the last name column. On the Home tab, choose Remove Duplicates. WPS checks only the selected key columns but returns all 10 columns in the resulting rows.

5
Create a separate duplicate output

Right-click the cleaned query in the Queries pane and choose Duplicate. In the duplicate query, go to Home > Keep Rows > Keep Duplicates to produce the duplicate result set.

6
Load results to worksheets

Click Close & Load To, choose Table, and select a new worksheet for the unique results. Repeat the same loading step for the duplicate query.

Review remaining variations: After loading, spot-check values that differ only by punctuation, spacing, or hidden characters, because not every variation can be cleaned automatically.
WPS Spreadsheets Data Cleaning

Deduplicate large Excel tables with WPS Spreadsheets Power Query

WPS Spreadsheets includes Power Query and built-in data cleaning tools, so you can trim, clean, standardize capitalization, remove duplicate rows, and load unique or duplicate results to new worksheets without switching to another Office suite.

  1. 1. Open your Excel file in WPS Spreadsheets: Launch WPS Office, open the workbook, and click a cell inside the table.
  2. 2. Load the table into Power Query: Go to Data > From Table/Range, confirm the range includes headers, and click OK.
  3. 3. Clean and deduplicate: Use Transform > Trim and Clean on the name columns, select both key columns, and choose Home > Remove Duplicates.
  4. 4. Load unique and duplicate results: Use Close & Load To to send unique rows to a new worksheet, and duplicate the query to keep duplicate rows separately.
Power Query cleaning reduces duplicate mismatches caused by spaces, hidden characters, and capitalization issues.Full compatibility with Microsoft Excel .xlsx, .xls, and .csv files.Lightweight, familiar ribbon interface makes data cleanup quick.Load unique and duplicate outputs to separate worksheets in one workflow.Free to download and use for large spreadsheet tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query still treat "DA - VINCI" and "DA-VINCI" as different values?

Because Power Query matches exact text strings, and punctuation, spaces, and hidden characters are part of the value. Apply Trim and Clean first, then manually review remaining punctuation differences if exact matching is required.

Can I check duplicates using only the first two columns but keep all 10 columns?

Yes. In the Power Query editor, select only the first and last name columns before choosing Remove Duplicates. WPS removes duplicate keys but returns the full row for each unique record.

How do I get both unique and duplicate rows?

Create one query that removes duplicates and another duplicate of the same query that uses Home > Keep Rows > Keep Duplicates. Load each query to a separate worksheet with Close & Load To.

Does WPS Spreadsheets have a simpler way to remove duplicates without Power Query?

Yes. Select the table, go to Data > Remove Duplicates, choose the first two name columns, and click OK. This is faster but does not clean hidden characters or inconsistent capitalization first.