Clearing an A to Z sort in Excel reverses the sorting order and restores your data to its original arrangement before the sort was applied. This is useful when you accidentally sort data and need to undo it, or when you want to reset the table to its pre-sorted state without manually reordering rows. You can undo a sort using Excel’s built-in Undo feature, or if you’ve made other changes since the sort, you can use the Sort dialog to remove sort criteria. No special tools or add-ins are needed—this works in all modern versions of Excel for Windows and Mac.
What You'll Need
- Microsoft Excel (2010 or later)
- A worksheet with sorted data
- Access to the Undo button or the Sort dialog
Step-by-Step
- Open the Excel workbook containing the sorted data.
- Check if the sort was the most recent action: if you haven’t performed any other edits (like typing, deleting, or formatting), click the Undo button (curved arrow icon) on the Quick Access Toolbar at the top-left corner of Excel. This instantly reverts the sort and restores the original row order. If Undo is grayed out, you’ve made other changes after sorting, so proceed to Step 4.
- If Undo does not work or you need to remove multiple sort levels, select the entire data range you sorted. Click any single cell within the sorted range—Excel will automatically detect the table boundaries if your data is formatted as a table or has consistent headers.
- Go to the Data tab on the Ribbon.
- In the Sort & Filter group, click the Sort button. This opens the Sort dialog box.
- In the Sort dialog, check the list of Sort Criteria. You will see one or more columns listed with their sort order (A to Z or Z to A).
- Click the Remove All button at the bottom of the dialog. This deletes all active sort fields, effectively clearing the A to Z sort.
- Click OK. Excel will revert the data to its original unsorted order before the sort was applied.
- Save your workbook to preserve the changes.
Common Mistakes
- Trying to undo the sort after typing new data or making formatting changes—Excel’s Undo only works for the last action. If you’ve done more than one edit since sorting, you must use the Sort dialog method.
- Selecting only a single column instead of the entire data range. If you select only the sorted column and click Sort, Excel may treat it as a standalone list and not recognize adjacent columns as part of the table, leading to data misalignment.
- Assuming Sort > Clear Sort removes the sort—it doesn’t exist. The correct option is Sort > Sort > Remove All.
- Using the Filter button to remove a sort: filters and sorts are separate functions. Turning off a filter does not undo a sort.
- Not verifying the data after clearing the sort. Always scroll through a few rows to confirm the original order has been restored.
Tips
- Before sorting, always select the entire data range, including headers, to ensure Excel treats it as a single table. This helps prevent accidental partial sorts.
- Convert your data range into an Excel Table (Ctrl+T) before sorting. Tables preserve sorting history and make it easier to clear sorts using the Sort dialog.
- Use the Sort dialog even for single-column sorts—it’s more reliable than Undo after multiple edits.
- If you frequently sort and undo, consider creating a backup copy of your data before sorting. Duplicate the sheet (right-click tab > Move or Copy > Create a copy) so you can revert by switching sheets.
- On Mac, the steps are identical, but the Ribbon may appear slightly different. Look for the Data tab and the Sort button in the same location.
- Sorts are not saved with the file unless you save after sorting. Clearing the sort before saving means the next time you open the file, it will appear unsorted.
Troubleshooting
- The data didn’t return to its original order after clicking Remove All: This usually means the data was not selected as a contiguous range. Go back, select the full range including every column and row involved in the sort, then repeat Step 4–8. If your data has blank rows or columns within it, Excel may misinterpret the boundaries. Manually select the exact range using Shift+click or drag.
- Remove All is grayed out: You may not have selected a cell within the sorted range. Click any cell inside the data area, then try again. Also ensure you’re on the Data tab and clicked Sort, not Filter.
- Excel says "The selection does not contain a valid range for sorting": You may have selected non-contiguous cells or a single cell outside the data table. Deselect and click a cell inside the data, then try again.
- Undo doesn’t work and Remove All doesn’t restore order: If you’ve saved the file after sorting, Excel permanently overwrites the original order. In this case, the only reliable fix is to restore from a backup file or manually reorder the data using a helper column with original row numbers (add a column with numbers 1, 2, 3... before sorting, then sort by that column later to restore).
- Sort dialog doesn’t open: Check if Excel is frozen or in edit mode. Press Esc to exit edit mode, then try again. Restart Excel if the issue persists.