Data Import & Export

How to Fix Incorrect Numerical Sorting in an Excel-to-Word Mail Merge

Chanuka GeekiyanageChanuka Geekiyanage Oct 20, 2026 869 views

Question details

Users experience incorrect numerical sorting (e.g., 100, 1000, 200) when performing a mail merge from Excel to Word.

How to Fix Incorrect Numerical Sorting in an Excel-to-Word Mail Merge
Product
Excel, Word
Device & OS
not provided
Scenario
Creating a mail merge document in Word using data imported from an Excel spreadsheet.
Observed behavior
Numbers are sorted alphabetically as text rather than numerically, causing out-of-order sequences.
Before you start

Ensure your Excel workbook is saved and closed in Microsoft Word before attempting to modify the source data formatting.

Solution 1Recommended

Convert Formula Results to True Numbers Using Paste Values

Use this method to strip formulas and text formatting, ensuring Word reads the data as pure numbers.

When Excel values are generated by formulas or imported as text, Word's mail merge feature defaults to reading them alphabetically. Converting these values to static numbers forces Word to sort them in standard numerical order.

1
Select the source data

Highlight the entire column in Excel that contains the formula-generated values or incorrectly formatted numbers.

2
Copy the data

Press Ctrl+C or right-click and select 'Copy' to copy the highlighted cells.

3
Paste as values

Right-click the destination column (or the same column) and choose 'Paste Special' > 'Values', or click the Paste Values icon (usually a clipboard with a '123' symbol).

4
Format as Number

Keep the new column selected, go to the Home tab, and change the Number Format dropdown from 'General' or 'Text' to 'Number'.

5
Run Mail Merge again

Save the Excel file, reopen your Word document, select the updated Excel file as your recipient list, and run the mail merge. The numerical sorting should now be correct.

Convert Formula Results to True Numbers Using Paste Values
Tip: If you see a small green triangle in the corner of your cells, you can select those cells, click the warning icon that appears, and choose 'Convert to Number' for a quick fix.
Seamless Mail Merge with WPS Office

Perform Flawless Mail Merges with WPS Office

WPS Office offers a built-in, highly compatible Mail Merge feature between WPS Spreadsheet and WPS Writer. Easily format your numbers, apply data sources, and generate documents without formatting glitches.

  1. 1. Format source data: Open your source data in WPS Spreadsheet, select the column, right-click, choose 'Format Cells', and set the category to 'Number'.
  2. 2. Access Mail Merge: Open your document in WPS Writer and navigate to the 'References' tab on the top ribbon.
  3. 3. Import data source: Click the 'Mail Merge' button, then select 'Open Data Source' to browse and import your saved WPS Spreadsheet file.
  4. 4. Insert fields: Click 'Insert Merge Field' to place your numerical data into the correct locations within the document.
  5. 5. Complete the merge: Click 'Merge to New Document' or 'Merge to Printer' to generate your final sorted files.
100% compatible with Microsoft Excel (.xlsx) and Word (.docx) formats.Intuitive Mail Merge wizard built directly into WPS Writer.Accurate data type recognition between Spreadsheets and Documents.Free, lightweight, and user-friendly alternative to Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Word change my Excel number formatting during a mail merge?

By default, Word connects to Excel using OLE DB, which reads the raw data values rather than the displayed formatting. If the underlying data is stored as text or contains mixed data types, Word will sort it alphabetically (e.g., 10, 100, 20).

Can I force Word to read the Excel formatting directly?

Yes. You can enable DDE (Dynamic Data Exchange) in Word by going to File > Options > Advanced, checking 'Confirm file format conversion on open', and selecting 'MS Excel Worksheets via DDE' when connecting your data source. However, converting to true numbers in Excel is usually faster and less prone to errors.

How do I fix date formatting issues in a mail merge?

Similar to numerical issues, date formatting can be fixed by applying field codes directly in Word. Press Alt+F9 to reveal field codes, and add a switch like \@ "MMMM d, yyyy" to the end of your date merge field.