Document Editing Problems

How to Merge Duplicate Grocery Order Rows for a Word Mail Merge in WPS Office

Jason MillerJason Miller Nov 13, 2026 869 views

Question details

The user needs to consolidate grocery order data where one OrderID spans multiple rows and product details are split across CoreProduct, AddOnProducts, and BoxContents into a customer-friendly packing list for mail merge.

Product
WPS Office Writer and WPS Spreadsheets
Device & OS
not provided
Scenario
A user is preparing a grocery packing list from order data where each order occupies multiple rows with the same OrderID and product details are spread across CoreProduct, AddOnProducts, and BoxContents.
Observed behavior
The same OrderID appears in multiple rows, and the product fields may contain comma-separated lists, so a standard mail merge repeats the order heading for every row instead of grouping all items under one order.
Before you start

Check that each order row contains an OrderID and that CoreProduct, AddOnProducts, and BoxContents are consistently separated by commas or another delimiter. Open the source file in WPS Spreadsheets first so you can clean and preview the data before starting the mail merge.

Solution 1Recommended

Consolidate Duplicate OrderID Rows in WPS Spreadsheets and Merge in WPS Writer

Use this when you want one packing list per order in a standard mail merge; it groups products under a single OrderID before running the merge.

A standard Word or WPS Writer mail merge creates one output document per source row. If the same OrderID appears in several rows, first consolidate those rows so the mail merge does not repeat the order heading for every product line.

1
Open the order data in WPS Spreadsheets

Open your grocery order workbook in WPS Spreadsheets. Select the data range including the OrderID, CoreProduct, AddOnProducts, and BoxContents columns.

2
Split comma-separated product fields

Select the product columns, click Data > Text to Columns, choose Delimited, check Comma, and finish to expand each product item into its own column.

3
Create one row per OrderID

Insert a helper column, then use Data > PivotTable or formulas such as TEXTJOIN/IF to combine all product items for the same OrderID into a single cell separated by line breaks.

4
Start the mail merge in WPS Writer

Open WPS Writer, click Mailings > Mail Merge > Mail Merge Wizard, and select the document type that matches the packing list, such as Letter for one page per order or Directory/Catalog if available. Select the consolidated WPS Spreadsheets file as the data source.

5
Insert fields and finish

Insert the OrderID and combined packing list merge fields, preview the result, then click Finish & Merge to print or save individual packing lists.

Consolidate Duplicate OrderID Rows in WPS Spreadsheets and Merge in WPS Writer
One order per heading: When the source is reduced to one row per OrderID, the merged document shows one order heading with all related product lines beneath it.
Direct WPS solution

Build a Customer-Friendly Grocery Packing List with WPS Office Mail Merge

Use WPS Spreadsheets to clean and consolidate the duplicate order rows, then run a WPS Writer mail merge to produce one clear packing list per OrderID without a separate Word add-in.

  1. 1. Open the source workbook: Start WPS Office, open the grocery order workbook in WPS Spreadsheets, and confirm the OrderID column is present.
  2. 2. Clean and consolidate the data: Use Data > Text to Columns to split product fields, then combine or pivot the data to one row per OrderID.
  3. 3. Start the WPS Writer mail merge: Open WPS Writer and go to Mailings > Mail Merge > Mail Merge Wizard, select the document type, and choose the cleaned spreadsheet as the recipient list.
  4. 4. Insert packing list fields: Insert the OrderID and combined product fields, preview the merged document, and adjust spacing or line breaks.
  5. 5. Finish and save: Click Finish & Merge to create the final packing lists, then save or print them.
Groups duplicate grocery order rows so each packing list starts with one OrderID headingSupport for .docx, .xlsx, and .csv keeps your Word and Excel files compatibleText to Columns and pivot-table tools make product fields easier to clean and rearrangeFamiliar mail merge wizard reduces the learning curve from Microsoft WordFree, lightweight WPS Office bundle includes both Writer and Spreadsheets
microsoft office alternative - wps office

Frequently Asked Questions

Why does a standard Word mail merge repeat the grocery order heading for each duplicate row?

Mail merge normally creates one output document per data row. When the same OrderID appears in multiple rows, each row produces a separate heading. Consolidate the rows in WPS Spreadsheets or use a directory/catalog merge so all product lines sit under one OrderID.

Can WPS Office create a many-to-one mail merge without Graham Mayor's add-in?

Yes. You can prepare one row per OrderID in WPS Spreadsheets and then use WPS Writer's Mailings > Mail Merge wizard. If you keep multiple rows, choose a directory/catalog document type to list product lines together.

How do I split CoreProduct, AddOnProducts, and BoxContents when they contain comma-separated lists?

In WPS Spreadsheets, select the columns, click Data > Text to Columns > Delimited, check Comma, and choose where to place the split columns before running the merge.

What is the easiest way to group duplicate OrderID rows in WPS Spreadsheets?

Use Insert > PivotTable and drag OrderID into the Rows area, then place the product fields in the Rows or Values area. Alternatively, use helper formulas like TEXTJOIN/IF to combine product lines into one cell per OrderID.

Can I create a printable packing list without using Word mail merge?

Yes. In WPS Spreadsheets, create a PivotTable with OrderID in Rows and product fields in Rows/Values, then set Report Layout > Show in Outline Form and print the sheet.