How to Remove Duplicate Names from Word Mail Merge Data
Question details
The user needs to ensure each counsel name appears only once in the final merged document and wants to ignore blank fields in the source data.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Performing a mail merge with data imported from an external application where multiple parties might be represented by the same counsel, creating duplicate entries.
- Observed behavior
- Word's MERGEFIELD outputs exactly what is in the data source without automatically deduplicating values or skipping blank entries.
Save a backup copy of your original data source file (such as your Excel spreadsheet or CSV) before applying any deduplication steps.
Preprocess and Deduplicate Data in Excel
Since Word cannot automatically deduplicate MERGEFIELD values, the most reliable method is to consolidate your data in Excel before running the mail merge.
Word mail merge is designed to pull records exactly as they appear in the connected database. To prevent duplicate names from appearing, you must clean the data source directly. Using Excel or Power Query allows you to quickly remove duplicates and filter out empty fields.
Launch Microsoft Excel and open the spreadsheet or exported data file containing the counsel names.
Highlight the column containing the counsel names, or select the entire data table if you want to keep entire records intact.
Navigate to the 'Data' tab on the ribbon and click on 'Remove Duplicates'. Select the column for counsel names to ensure only unique names are kept.
Apply a filter to the counsel column, uncheck the 'Blanks' option to hide empty entries, and copy the cleaned data to a new sheet.
Save this cleaned spreadsheet, open your Word document, and connect this new file as your Mail Merge recipient list.

Use Conditional IF Fields in Word
Advanced users can use Word's IF fields combined with MERGEFIELD to dynamically skip duplicate or blank entries during the merge process.
Easily Manage Mail Merge and Data Deduplication with WPS Office
WPS Office provides a highly compatible and intuitive suite for managing complex mail merge tasks. You can seamlessly clean up your data in WPS Spreadsheet and execute a flawless mail merge in WPS Writer without advanced coding.
- 1. Open your data in WPS Spreadsheet: Launch WPS Spreadsheet and import your raw data containing the duplicate counsel names.
- 2. Remove duplicates instantly: Go to the 'Data' tab, click 'Remove Duplicates', and select the specific column to automatically clean your list.
- 3. Start WPS Writer Mail Merge: Open your document in WPS Writer, navigate to the 'References' tab, and click 'Mail Merge' to activate the tools.
- 4. Connect the cleaned data: Click 'Open Data Source', select your newly saved WPS Spreadsheet file, and insert your fields to finish the document.

Frequently Asked Questions
Can Word automatically remove duplicate MERGEFIELD values?
No, Word's mail merge feature does not have a built-in function to automatically remove duplicate values. It pulls data exactly as it appears in the connected source file. You must preprocess the data in Excel, Access, or use complex conditional IF field codes.
How do I skip blank fields in a Word mail merge?
You can use the 'Skip Record If' rule located under the 'Rules' dropdown in the Mail Merge ribbon tab. Set the rule to skip the record if the specific counsel field is equal to blank. Alternatively, clean the blanks out of your source spreadsheet before merging.
What is the keyboard shortcut to view MERGEFIELD codes in Word?
You can press Alt + F9 on Windows (or Option + F9 on Mac) to toggle between viewing the underlying field codes (like { MERGEFIELD CounselName }) and their actual merged results in the document.




