Sort Excel Rows, Edit Data, and Restore the Original Order
Question details
The user wants to sort Excel rows, edit the data, and then return the rows to their original order.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A roster needs to be sorted by a date or category for editing, then returned to its initial sequence.
- Observed behavior
- Excel does not automatically retain a reusable record of the original row order after sorting.
Add an empty column beside the roster before sorting. Make sure each row has a unique sequence number and that the entire roster is included in each sort.
Add an Original Order column and sort by it later
Use a permanent sequence number to restore the roster after sorting and editing.
Add a column named Original Order beside the roster. Enter 1 and 2 in the first two data rows, select both cells, and drag the fill handle down to number every row.
Select the entire roster, including Original Order, then open Data > Sort. Choose the date or category column and the desired sort order. If Excel asks, choose Expand the selection.
Edit the required cells in the sorted roster. Leave each row's Original Order number unchanged so it remains attached to that row.
Select the entire roster again, open Data > Sort, and sort the Original Order column from smallest to largest.

Restore Sorted Rows in WPS Spreadsheets
Use an Original Order column in WPS Spreadsheets to sort a roster, edit its data, and return the rows to their starting sequence.
- 1. Open the workbook: Open WPS Spreadsheets and choose Open to select your Excel workbook.
- 2. Number the rows: Add an Original Order column, enter 1 and 2 in the first two data rows, and drag the fill handle down to create a unique number for each row.
- 3. Sort and edit: Select the full roster, including the new column, then use Data > Sort to sort by the desired date or category. Edit the sorted rows without changing their sequence numbers.
- 4. Restore and save: Select the full roster and use Data > Sort to sort Original Order in ascending order. Choose File > Save to save your changes.

Frequently Asked Questions
Can Excel automatically restore the original row order after a sort?
Excel does not automatically keep a reusable original-order key. Before sorting, add a column with unique sequential numbers, then use Data > Sort to sort that column from smallest to largest when you want to restore the order.
How do I keep row data together when sorting?
Select the entire roster, including the Original Order column, before choosing Data > Sort. If Excel prompts you, choose Expand the selection so the other columns move with the sorted rows.
Can I hide the Original Order column?
Yes. Right-click the Original Order column header and choose Hide. Unhide it when you need to sort by its numbers again.
What happens if I add rows after creating the sort key?
Give each new row a unique Original Order value that represents where it should appear. Then include the new rows and the key column when you use Data > Sort.




