Document Editing Problems

How to Group Records by State and City in Word Mail Merge

Amos GikundaAmos Gikunda Nov 4, 2026 869 views

Question details

The user needs to perform a many-to-one mail merge to summarize approximately 200 records grouped by state and city without inserting page breaks.

How to Group Records by State and City in Word Mail Merge
Product
Microsoft Word
Device & OS
not provided
Scenario
Creating a consolidated directory or report using a sorted source spreadsheet, where entries are grouped under state and city headings on a continuous page.
Observed behavior
The MergeSeq field and conditional IF field formulas are not producing the expected grouping results, and unwanted extra paragraph marks appear in the output.
Before you start

Ensure your source spreadsheet is strictly sorted by your grouping categories—first by State, then by City, and finally by Name—before importing it into your document.

Solution 1Recommended

Execute Finish & Merge to Evaluate MergeSeq Correctly

Word's MergeSeq field and complex conditional formulas do not calculate their final values during the Preview Results stage. You must complete the merge to see the correct output.

When building a many-to-one mail merge, the sequence and conditional logic require the document to be fully processed. Relying on 'Preview Results' will often display inaccurate formatting and sequencing.

1
Navigate to Mailings

Click on the 'Mailings' tab in the top ribbon menu after setting up your IF fields and MergeSeq codes.

2
Select Finish & Merge

Click the 'Finish & Merge' button located at the far right of the Mailings ribbon.

3
Edit Individual Documents

Choose 'Edit Individual Documents' and select 'All' to generate the final merged document, which will properly calculate the MergeSeq fields and conditional grouping.

Execute Finish & Merge to Evaluate MergeSeq Correctly
Preview Results Limitation: Do not attempt to troubleshoot your complex IF field codes based solely on what is displayed in the Preview mode.
Effortless Document Merging

Perform Mail Merges Easily with WPS Office

If complex field codes are slowing you down, try WPS Office. It provides an intuitive Mail Merge feature and a built-in spreadsheet editor, making it easier to manage your data and generate perfectly formatted documents.

  1. 1. Open WPS Writer: Launch WPS Writer and navigate to the 'References' tab on the top ribbon, then click 'Mail Merge'.
  2. 2. Import Your Data: Click 'Open Data Source' and select your pre-sorted spreadsheet containing the State, City, and Name data.
  3. 3. Insert Merge Fields: Click 'Insert Merge Field' to place your data points exactly where you need them in the document layout.
  4. 4. Generate Document: Click 'Merge to New Document' to finalize the process and review your completed data list.
Fully compatible with Microsoft Word (.docx) and Excel (.xlsx) formatsIntuitive Mail Merge wizard for quick and accurate data mappingLightweight suite that seamlessly handles both your spreadsheets and text documentsCompletely free basic features to streamline your daily workflow
QA img-9

Frequently Asked Questions

Why isn't my MergeSeq field updating correctly in the preview mode?

The MergeSeq field relies on the actual execution of the mail merge to sequence records properly. It will not display accurate results in 'Preview Results' mode. You must use 'Finish & Merge' to view the true output.

How do I remove extra blank lines in a grouped mail merge?

Extra paragraph marks occur when conditional IF fields suppress text but leave the paragraph return intact. To fix this, toggle your field codes (Alt+F9) and ensure the paragraph return (Enter) is placed inside the conditional quotes, not outside.

Do I need to sort my Excel data before running a grouped mail merge?

Yes. Word reads data sequentially row by row. For conditional IF fields to detect category changes properly, your source spreadsheet must be strictly sorted by your primary group (State) and then your secondary group (City) before starting the merge.