To clear a sort in Excel for Microsoft 365 on Windows, select a cell in the sorted data and choose Data > Sort & Filter > Clear. This clears the active sort or filter settings, but it does not reliably put rows back in the order they had before sorting; use Ctrl+Z immediately after the sort, or sort by a saved original-order column, to restore that sequence.
What clearing a sort does
Sorting rearranges the rows in a range or table according to values in one or more columns. For example, sorting a list of customers by city moves each customer’s whole row so that cities appear alphabetically. Excel changes the displayed row order; it does not keep a hidden copy of the previous sequence that a Clear command can automatically restore.
The Data tab’s Clear command is useful for removing active sort or filter settings, including filter criteria that hide rows. It is not the same as undoing the operation. After clearing, the data may still appear in the sorted sequence even if the sort indicator or settings are cleared. If your goal is to show every record, clear the filter. If your goal is to recover the exact sequence from before a sort, use Undo or a saved order field.
This distinction matters because “clear sort” can mean two different things: removing the current sort state, or returning records to their earlier arrangement. Excel can clear settings, but it can only reconstruct an earlier arrangement if that order is still available through Undo, a backup, or a column that records it.
Clear the current sort or filter settings
For a normal range or an Excel table, first click a cell inside the data. Then select Data > Sort & Filter > Clear. The command applies to the relevant data range and clears active filter criteria and sort settings. Check the results afterward: the rows may remain in their current physical order, and a cleared filter can make previously hidden rows visible again.
If you only need to remove a filter from one column, click that column’s filter arrow and choose Clear Filter From followed by the column name. This keeps filters on other columns in place. To remove the filter controls themselves, select a cell in the range and choose Data > Filter to toggle them off. Turning filter arrows off is different from clearing criteria: a filtered range can contain hidden rows until the filter is cleared.
In Excel for Mac, the Data tab also provides sorting and filtering controls; names and ribbon layout can vary slightly by release. Look for Clear in the Sort & Filter group, or use the filter-arrow menu for a single column. Excel for the web has a similar Data tab, though the available controls and layout can differ from the Windows desktop app.
Restore the previous order with Undo
If you just sorted and have not made other changes, Undo is usually the quickest way to reverse the sort. On Windows, press Ctrl+Z or select the Undo button on the Quick Access Toolbar. On a Mac, press Command+Z. Undo reverses the most recent action, so if you have edited cells or performed several other operations since sorting, you may need to undo more than once. Review each change as you go.
Undo is most dependable when used right after sorting. If the workbook has been closed, the action is no longer in the available Undo history, or later edits make undoing impractical, do not assume that Clear can recover the old row order. Consider whether the file has a saved earlier version or whether a backup is available before trying other changes.
Undoing a sort is different from undoing a filter. A filter hides rows without changing their relative order, so clearing the filter reveals them again in the same sequence. A sort moves rows into a new sequence, so removing a filter or clearing settings does not necessarily reverse that movement.
Restore original order with a helper column
If you need to sort repeatedly and be able to return to the starting sequence, add an original-order column before the first sort. Give each record a unique fixed number in its current order, such as 1, 2, 3, and so on. Later, sort the complete dataset by that column from smallest to largest. The rows will return to the sequence represented by those numbers.
- Before sorting, insert a column called Original order.
- Enter a sequence number for every data row. Make these fixed values, not formulas that recalculate based on the row’s current position.
- Sort the entire range or table by the column you need, keeping each record’s fields together.
- To restore the starting sequence, sort the data by Original order from smallest to largest.
- Keep the helper column if you may need it again; hide it if it is not useful in the everyday view.
The timing is essential. If the data has already been sorted and you then number the rows, those numbers describe the current order, not the original one. In that situation, use Undo, find an earlier copy, or reconstruct the intended sequence from a reliable source. A helper column is a safeguard for future sorts, not a way to infer an order that Excel no longer has.
Keep records together when sorting
A common cause of damaged-looking data is sorting only one column. If names are in one column and phone numbers or order totals are beside them, sorting just the names can disconnect each value from the correct record. When Excel detects adjacent data, it may prompt you to expand the selection. Choose Expand the selection so the associated cells move with each row. Do not choose to continue with the current selection unless you intentionally want to sort that column independently.
Before sorting, confirm that the range includes every field belonging to the records and that the header row is identified correctly. In the Sort dialog, check My data has headers when the first row contains labels such as Name or Date. Otherwise, Excel may treat a heading as an ordinary value and move it into the data. For an Excel table, use a header’s sort menu or the Sort dialog; table sorting is designed to keep values in each record’s row together.
If the data includes blank rows or columns separating sections, Excel may identify a smaller contiguous region than you intended. Select the complete range first, including all relevant columns and rows, before opening the sort controls. After sorting, spot-check a few records across multiple columns to make sure the values still belong together.
Clear filters without changing the sort
Filters and sorts are related controls, but they solve different problems. A filter limits which rows are visible based on a condition, such as showing only orders marked Pending. A sort changes the order of the rows that are displayed. You can filter a sorted list, sort a filtered list, or use both at once.
To show all rows while retaining the current order, use Data > Sort & Filter > Clear or clear the relevant filter from its column menu. If you want to keep the filter controls available for later use, do not toggle Data > Filter off unnecessarily. Conversely, if you want to remove the drop-down arrows, toggle Filter off after clearing any conditions. The exact result depends on whether the range currently has filters, sort settings, or both, so inspect the visible rows and header indicators after using Clear.
For a table, a filter-arrow menu can show a check mark beside a selected value or offer a clear-filter option. Clearing that column’s filter restores its hidden records. It does not guarantee a return to the original row sequence if the table was sorted earlier.
Common problems and checks
- Rows are still in alphabetical order: That is expected after clearing sort settings. Use Undo or sort by an original-order column.
- Some records are missing: A filter may still be active. Clear the filter criteria and check whether rows reappear.
- Values no longer match their names: A single column may have been sorted without expanding the selection. Undo immediately if possible; otherwise, restore from a backup or a trustworthy source.
- The header moved: Check the My data has headers setting in the Sort dialog and undo if the sort included the heading as a record.
- The sort arrow remains or disappears unexpectedly: An arrow can indicate a sort or filter control, but its appearance is not proof that the original order can be recovered. Inspect the rows and the filter menu.
When the result is important, save a copy before experimenting with additional sorts. Sorting can be repeated, but once the original sequence is lost and Undo is unavailable, a new sort cannot identify the earlier sequence unless you have another source of order information.
Prevent confusion before the next sort
For a one-time sort, the simplest protection is to make sure the whole dataset is selected and use Undo immediately if the outcome is wrong. For recurring analysis, keep an Original order field or preserve a clean, unsorted copy on a separate worksheet. A table can make sorting and filtering easier to manage, but it does not preserve a recoverable history of every prior row arrangement.
Before applying a sort, consider whether the order itself has meaning. A list entered in a particular sequence—such as a manually prioritized task list—should have an explicit priority or sequence column if that order matters. A saved numeric value is clearer and safer than relying on the current physical position of rows. If several people edit the workbook, explain what the helper column represents so someone does not delete or sort it accidentally.
Frequently Asked Questions
Does Excel Clear restore the original order?
No. Clear removes active sort or filter settings, but it is not a reliable way to reverse the row movement caused by sorting. Use Undo or sort by a sequence column created before the sort.
How do I remove a sort without removing filter arrows?
Select a cell in the data and use Data > Sort & Filter > Clear to clear the active settings. If only one column is filtered, clear that filter from its header menu. Check the displayed order afterward because clearing settings may not restore the earlier sequence.
Can I undo a sort after saving the workbook?
Saving does not itself provide a command to reverse a sort, and the Undo history may not be available after closing the file. Check for an earlier saved version or backup. If you created an Original order column before sorting, sort by it to recover that order.
How do I show rows hidden by a filter?
Use Data > Sort & Filter > Clear, or open the relevant column’s filter menu and choose its clear-filter option. This reveals rows excluded by the filter; it does not necessarily change the order of the records.
How can I make Excel remember my original order?
Before sorting, add a column of fixed, unique sequence numbers to the records. When you want to return to that order, sort the complete dataset by those numbers in ascending order.
Related
- Excel Max Date: What Is the Latest Date Excel Supports?
- Excel Max Columns: The 16,384-Column Limit Explained
- Excel Max Absolute Value: Find the Largest Magnitude
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- SUMIF in Excel: Count Values or Sum Them CorrectlySUMIF adds numbers that meet a condition; it does not count matching cells. To count matches, use COUNTIF…
- Excel INDIRECT Errors: Causes, Fixes, and ExamplesAn Excel INDIRECT error usually means the text supplied to INDIRECT cannot be turned into a valid cell…
- Excel Query Function: What to Use InsteadExcel does not have a worksheet function named QUERY like Google Sheets does. In Microsoft 365 for Windows,…
- Excel MAX of Filtered Data: Formula, Limits, and FixesIf your numbers are in B2:B100, use =SUBTOTAL(4,B2:B100) to return the largest value among rows currently shown by…
- Excel Cell Range Average: Formula and ExamplesTo average a range in Excel, use AVERAGE: if A2:A5 contain 10, 20, a blank cell, and 0,…
- Excel Time Sheet Sample: Layout, Formulas, and TipsAn Excel time sheet sample is a worksheet for recording each workday’s start time, unpaid break, end time,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.