Document Editing Problems

How to Create a Static Running Number Column in a Word Table

Nimra MalikNimra Malik Oct 23, 2026 869 views

Question details

The user needs a way to lock the values in a numbered table column so they do not automatically renumber when the table is sorted.

How to Create a Static Running Number Column in a Word Table
Product
Word
Device & OS
not provided
Scenario
Sorting a table containing a numbered column where the original row identifiers need to be preserved exactly as they were initially numbered.
Observed behavior
The default list format automatically updates and renumbers the column sequentially after a table sort, overriding the original numbers associated with each row.
Before you start

Ensure your table is fully populated and you have applied the initial auto-numbering to the desired column before converting it to static text.

Solution 1Recommended

Convert Auto-Numbers to Static Text using VBA

The most efficient way to freeze your numbered column is by using a quick VBA command to convert the dynamic list into plain text before sorting.

By default, Word treats numbered lists dynamically. Running a single line of code in the Visual Basic Editor instantly converts these dynamic fields into standard text, locking their values in place permanently.

1
Apply auto-numbering

Select the entire table column you wish to number, go to the Home tab on the ribbon, and click the Numbering button to apply your desired format.

2
Open the VBA Editor

Press Alt + F11 on your keyboard to launch the Visual Basic for Applications (VBA) Editor.

3
Open the Immediate Window

Inside the VBA Editor, press Ctrl + G to open the Immediate Window, which typically appears at the bottom of the screen.

4
Execute the conversion command

In the Immediate Window, paste or type 'Selection.Range.ListFormat.ConvertNumbersToText' (without quotes) and press Enter.

Convert Auto-Numbers to Static Text using VBA
Ready to Sort: Once executed, you can safely sort your table columns. The numbers will follow their respective rows without automatically reordering themselves.
Effortless Document Editing

Create and Manage Tables Easily with WPS Writer

WPS Writer provides robust table formatting and list management features. Whether you need to apply numbering, sort complex data, or manage large tables, WPS Office allows you to do it efficiently while maintaining seamless compatibility with Microsoft Word formats.

  1. 1. Insert a Table: Open your document in WPS Writer, go to the Insert tab, and easily create a customized table.
  2. 2. Apply Numbering: Highlight the specific column you need to organize and click the 'Numbering' icon found under the Home tab.
  3. 3. Sort Data: Use WPS Writer's straightforward sorting tools located in the Table Tools tab to arrange your data effortlessly.
Fully compatible with Microsoft Word (.docx) formatsLightweight and fast for smooth document editing and table sortingIntuitive user interface for quick list numbering and formatting
microsoft office alternative - wps office

Frequently Asked Questions

Why do my table numbers change when I sort the rows alphabetically?

Word's default auto-numbering feature is dynamic. When rows move during a sort, the list automatically recalculates to maintain a sequential 1-2-3 order from top to bottom, regardless of where the original row data moved.

Can I manually type the numbers to keep them static?

Yes, manually typing numbers into each cell ensures they remain completely static during any sorting process. However, for long tables, converting an auto-numbered list to text via VBA is much faster and less prone to typing errors.

How do I revert static text numbers back to dynamic auto-numbering?

If you need them to automatically update again, you must delete the static text numbers in the column, highlight the empty cells, and re-click the Numbering button on the Home tab to apply a fresh, dynamic list.