Clear Sort in Excel: Shortcut & Steps
In this article
There is no single built-in shortcut that removes a sort and restores the original row order, because Excel does not keep a history of your data's previous arrangement. What you can do is clear the sort state so no sort filter or sort criteria remain active, and then either undo the last sort immediately or restore your original order from a helper column. The fastest reliable method is to press Ctrl+Z right after sorting, or to use a numbered helper column you created before sorting. If you need to clear a sort that is part of a table or filter, use the Sort & Filter menu to remove it. This guide walks through each approach, explains what actually gets cleared, and covers the mistakes that leave people stuck with scrambled rows.
What You'll Need
- Excel for Windows or Mac (the steps below apply to both; menu labels can differ slightly by version, device and region).
- A worksheet where you have sorted data and want to return to the original order, or want to remove an active sort state.
- Optional but strongly recommended: a helper column with sequential numbers created before you sort, so you can always restore the original order.
Step-by-Step
- Try Undo first. Immediately after sorting, press Ctrl+Z (Windows) or Command+Z (Mac). Excel reverses the sort and returns rows to their previous order. This works only while the sort is still in the undo history; once you save, close the file, or make many other edits, Undo may no longer reach back to the sort.
- Check whether a filter is active. If the sort was applied through a filter dropdown, look at the column headers for a funnel icon. Click the funnel icon and choose Clear Filter from the menu. This removes the filter but does not reorder rows; it only stops Excel from hiding rows.
- Remove sort state from a table. If your data is formatted as a table, click any cell in the table, open the Data tab, and use Sort & Filter > Clear (or the Clear option in the Sort dialog). This clears the sort criteria stored with the table so future refreshes or edits do not reapply the old order. The current row order stays as it is.
- Restore original order with a helper column. If you created a numbered column before sorting, click any cell in that column, go to Data > Sort, choose the helper column as the Sort by field, and set Order to Smallest to Largest. Your rows return to their original sequence. Delete the helper column afterward if you no longer need it.
- Use a backup copy if no helper column exists. If you saved over the file and have no helper column, open the previous version from File > Info > Version History (if available in your Excel version) or restore from your own backup. Excel cannot reconstruct the original order from the sorted data alone.
- Clear sort from a PivotTable. Click a cell in the PivotTable, open the PivotTable Analyze tab (called Analyze in some versions), and use the Sort options to reset the sort order to the default. Alternatively, right-click a row label and choose Sort > Sort A to Z or the default option to remove a custom sort.
- Save the cleared state. Once the order is correct, save the workbook so the cleared sort state persists. If you used Undo, save immediately to lock in the restored order.
Common Mistakes
- Expecting a dedicated shortcut. There is no default Excel keyboard shortcut that means "clear sort." Ctrl+Z undoes the last action, which may be the sort, but it is not a sort-clearing command. Anyone who tells you otherwise is describing Undo, not a sort reset.
- Sorting without a helper column. Sorting a range in place destroys the original order permanently unless you undo or have a backup. Always add a numbered column first if order matters.
- Confusing filter with sort. Clearing a filter hides nothing and reorders nothing; it only removes the filter criteria. If rows are still out of order, the sort itself is still applied.
- Sorting only part of the data. If you select a single column and sort, Excel may ask whether to expand the selection. Choosing "Continue with the current selection" scrambles rows relative to their neighbors. Always expand the selection or sort from a single cell inside the range.
- Assuming Undo is unlimited. Undo history is limited and is cleared when you close the workbook. Saving does not clear it, but closing does.
Tips
- Create a helper column with 1, 2, 3, and so on before any sort. It is the only reliable way to restore original order after saving.
- Use Ctrl+Shift+L (Windows) or Command+Shift+L (Mac) to toggle filters on and off quickly. This is a real shortcut for filters, not for clearing sorts.
- If you sort frequently, convert your range to a table (Ctrl+T). Tables remember sort state and are easier to reset.
- Keep a copy of the unsorted sheet in a separate tab or file before major sorts.
- When sorting by multiple columns, use the Sort dialog (Data > Sort) rather than the quick A-Z buttons, so you can see and clear all levels at once.
Troubleshooting
- Undo does not restore the order. The sort is no longer in the undo history. Use a helper column, Version History, or a backup. If none exist, the original order cannot be recovered.
- Rows still look sorted after clearing the filter. The filter and the sort are separate. Clearing the filter does not unsort. Use Undo, a helper column, or re-sort by your helper column.
- The Clear option is greyed out in the Sort dialog. This usually means no sort state is stored for that range or table, or the selection is not a table. Click inside the table first, then reopen the dialog.
- PivotTable keeps reverting to the old sort. PivotTables store sort settings with the pivot cache. Reset the sort from the row label's right-click menu, then refresh the PivotTable.
- Sorting changed formulas or references. Sorting moves cells, and relative references move with them. If formulas now point to the wrong rows, undo the sort and check whether your formulas used absolute references ($) where needed.
Frequently Asked Questions
Is there a keyboard shortcut to clear a sort in Excel?
No. Excel has no dedicated shortcut for clearing a sort. Ctrl+Z undoes the last action, which may be the sort, but it is Undo, not a sort reset. To restore original order after saving, use a helper column or a backup.
Does clearing a filter also clear the sort?
No. Filters hide rows; sorts reorder them. Clearing a filter leaves the sorted order in place. You must undo the sort or re-sort by a helper column to restore the original order.
Can I recover the original order after saving a sorted file?
Only if you have a helper column, a backup, or Version History available in your Excel version. Excel does not store the pre-sort order once the file is saved and Undo history is gone.
How do I remove a sort from a table without changing the row order?
Click inside the table, open Data > Sort & Filter, and use the Clear option in the Sort dialog. This removes the stored sort criteria without reordering the current rows.
Why does my PivotTable keep sorting the same way?
PivotTables store sort settings in the pivot cache. Reset the sort from the row label's right-click menu, then refresh the PivotTable to apply the change.
What is the fastest way to avoid this problem in the future?
Add a numbered helper column before sorting, or keep an unsorted copy of the sheet. Both let you restore the original order in seconds without relying on Undo.