Can You Clear a Sort in Excel? How to Undo or Remove It
In this article
- Why Excel Has No "Unsort" Button
- Method 1: Undo Immediately (Ctrl+Z)
- Method 2: Re-Sort to Restore the Original Order
- Method 3: Clear the Sort from a Table or Filter Dropdown
- Clearing Sort State with a Helper Column Trick
- Sorting vs. Filtering: A Common Confusion
- If That Did Not Work
- Frequently Asked Questions
Yes, you can clear a sort in Excel, but there is no single "clear sort" button. Excel stores no original order for your data, so clearing a sort means either undoing it immediately, restoring the original sequence with a helper column, or simply removing the sort state itself. The right method depends on whether you still have the file open and how the data was sorted.
Why Excel Has No "Unsort" Button
This surprises many people: Excel does not remember the order your rows were in before you sorted them. Once you sort and save, the original row sequence is gone unless you have some column that preserves it, such as a date, an ID number, or an entry timestamp. That is why there is no simple "remove sort and go back" command. Sorting physically rearranges the rows; it does not apply a view you can switch off, the way filtering does.
Method 1: Undo Immediately (Ctrl+Z)
If you sorted by mistake and have not done anything else since, the fix is instant:
- Press Ctrl+Z (Windows) or Command+Z (Mac) immediately after sorting.
- Or click the Undo arrow in the Quick Access Toolbar at the top-left of the window.
Undo works only while the workbook is still open in the same session. Once you close and reopen the file, the undo history is cleared and this option is gone. Note that the undo stack can also be wiped by certain actions, so if you have made many edits since the sort, undoing back that far may not be practical.
Method 2: Re-Sort to Restore the Original Order
If the undo window has passed, you can only return to the original order if your data contains something that encodes it. Common options:
- An ID or reference number: sort ascending on that column to get the original entry order back.
- A date or timestamp column: sort by date, oldest to newest.
- A backup or previous version: if you have an older copy of the file, copy the data back or compare against it.
If none of these exist, the original order is not recoverable from the current file. This is exactly why many Excel users add a numbered index column before doing anything experimental.
Method 3: Clear the Sort from a Table or Filter Dropdown
If your data is formatted as an Excel Table, or has AutoFilter arrows on the headers, the sort remains "active" and the header shows a small sort icon. You may want to clear that state, especially because new rows added to a sorted table can be placed according to the current sort:
- Click the filter arrow on the column header that shows the sort icon.
- Choose Clear Sort from "Column Name" (the wording names your column; labels can vary slightly between Excel versions).
Be aware of what this actually does: it removes the sort setting so future entries are not auto-sorted, but it does not put your rows back in their old positions. The data stays exactly where it is. The sort icons disappear from the header, and that is the extent of the change.
Clearing Sort State with a Helper Column Trick
For the future, the standard prevention technique takes seconds:
- Before sorting, insert a new column next to your data.
- Fill it with sequential numbers (1, 2, 3...) matching the current row order.
- Sort freely. When you want the original order back, sort on the helper column ascending.
- Delete the helper column when you are done.
This is the closest thing Excel has to a real "clear sort" for saved files, and it is worth building into any workflow where you experiment with sorts on important data.
Sorting vs. Filtering: A Common Confusion
People often mix these up because both use the same dropdown arrows. Filtering only hides rows; clearing a filter (Data tab, then the Clear button in the Sort & Filter group) brings hidden rows back and genuinely restores what you had. Sorting rearranges rows, and there is no equivalent "clear" that restores them. So if a colleague tells you they "cleared the sort" and their data reappeared correctly, they almost certainly cleared a filter instead.
If That Did Not Work
If Ctrl+Z no longer reverses the sort, check that you are in the same Excel session and have not saved and reopened. If the sort icon will not clear on a Table, click any cell inside the table first, then use the filter arrow again; you can also temporarily convert the Table back to a normal range via Table Design > Convert to Range. If data is genuinely scrambled with no order-preserving column, look for an AutoRecover version (File > Info > Version History in saved-to-cloud files) or a backup copy before accepting the loss.
Frequently Asked Questions
Can I unsort data after saving and closing Excel?
Not directly. Undo history does not survive closing the file. Your only routes back are re-sorting on a column that preserves the original order (like an ID or date) or restoring from a backup or version history.
What is the shortcut to undo a sort in Excel?
Ctrl+Z on Windows or Command+Z on Mac. It must be pressed while the workbook is still open and before too many other actions have pushed the sort out of the undo stack.
Does "Clear Sort" put my rows back in the original order?
No. Clear Sort only removes the active sort setting from a table or filtered range, so the header icon disappears and new rows are no longer auto-sorted. The rows stay in their current positions.
Why does my table keep sorting itself when I add new rows?
Because a sort is still applied to the table. Open the filter arrow on the sorted column and choose Clear Sort; after that, new rows will stay where you enter them.
How do I sort data back to how I entered it?
If you entered rows over time and there is no date or ID column, the entry order cannot be recovered. Going forward, add a numbered helper column before sorting so you can always sort back.
Is there a difference between clearing a sort and clearing a filter?
Yes. Clearing a filter (Data > Clear in the Sort & Filter group) unhide rows and fully restores the view. Clearing a sort only removes the sort state; the row order does not change.