Power Query Problems

How to Combine Rows with Matching Values in WPS Spreadsheets and Excel Power Query

Nimra MalikNimra Malik Nov 13, 2026 870 views

Question details

The user needs to merge multiple rows that share the same value into one row per value, using either native spreadsheet formulas or Power Query.

How to Combine Rows with Matching Values in WPS Spreadsheets and Excel Power Query
Product
WPS Spreadsheets, Microsoft Excel Power Query
Device & OS
not provided
Scenario
A table contains repeated values in a key column, and the user wants to consolidate all rows with the same key while joining text or summing numbers in the other columns.
Observed behavior
Matching rows currently remain separate; the expected output is one consolidated row per key value with the selected columns merged or aggregated.
Before you start

Open the worksheet in WPS Spreadsheets or Excel and identify the column with repeated values. Decide which other columns should be summed, counted, or joined as text before choosing a method.

Solution 1Recommended

Combine Matching Rows in WPS Spreadsheets with Formulas

Use this when you want a formula-based result that updates automatically and you do not need Excel Power Query.

WPS Spreadsheets supports Excel-compatible functions such as UNIQUE, TEXTJOIN, and SUMIF/SUMIFS. This makes it possible to create a distinct key list and then merge text or total numbers for each key.

1
Extract the unique key list

Copy the key column to a new sheet, select it, go to Data > Remove Duplicates, and confirm the range to keep only one row per value.

2
Join text values for each key

In the adjacent cell type =TEXTJOIN(", ",TRUE,IF($A$2:$A$100=A2,$B$2:$B$100,"")) and press Enter; if needed, confirm as an array formula.

3
Total numeric values for each key

In the next column type =SUMIF($A$2:$A$100,A2,$C$2:$C$100) and press Enter.

4
Fill the formulas down

Select the formula cells and drag the fill handle down the unique list to apply the aggregation to every key.

Combine Matching Rows in WPS Spreadsheets with Formulas
Formula result stays dynamic: The combined rows update when the source data changes; copy and paste as values if you need a static output.
WPS Spreadsheets how-to

Combine Matching Rows in WPS Spreadsheets Without Power Query

Use WPS Spreadsheets to create a unique key column with Remove Duplicates, then join text with TEXTJOIN and total numbers with SUMIF. It is a free, Excel-compatible way to consolidate rows without needing Excel Power Query.

  1. 1. Open your workbook in WPS Spreadsheets: Launch WPS Office, open the .xlsx or .xls file, and review the table with matching row values.
  2. 2. Create a unique key list: Copy the key column to a new sheet, select the pasted range, and click Data > Remove Duplicates.
  3. 3. Join text for each key: In the cell next to the first unique key, enter =TEXTJOIN(", ",TRUE,IF($A$2:$A$100=A2,$B$2:$B$100,"")) and press Enter.
  4. 4. Sum numbers for each key: In the following column, enter =SUMIF($A$2:$A$100,A2,$C$2:$C$100) and press Enter.
  5. 5. Fill down and save: Drag the fill handle down the unique list to apply the formulas, then save the workbook in Excel-compatible .xlsx format.
Combine text and total numbers with Excel-compatible formulasOpens and saves .xlsx, .xls, and .csv files without losing formattingNo Power Query license or Microsoft 365 subscription requiredFree, lightweight interface with Data tools such as Remove Duplicates and PivotTable
microsoft office alternative - wps office

Frequently Asked Questions

Can I combine rows with matching values in WPS Spreadsheets without Power Query?

Yes. Copy the key column to a new sheet, use Data > Remove Duplicates to build a unique list, then use TEXTJOIN to combine text and SUMIF or SUMIFS to total numbers.

How do I group rows in Excel Power Query?

Select the table and go to Data > From Table/Range. In Power Query Editor, select the key column, click Transform > Group By, add aggregation columns, and then Close & Load.

Which formula joins text from multiple rows that share the same key?

Use =TEXTJOIN(", ",TRUE,IF(range=key,text_range,"")) and fill it down the unique key list. In newer spreadsheet versions it spills or returns the joined text for that key.

Does WPS Spreadsheets support Excel .xlsx files for row consolidation?

Yes. WPS Spreadsheets opens and saves Excel .xlsx, .xls, and .csv files, so you can consolidate rows and keep Excel compatibility.