How To Sort And Filter Data In Excel (2026)
Sorting puts a list in order, and filtering hides the rows you do not want to see.
Both live on the Data tab in the Sort & Filter group.
This guide covers one-column sorts, multi-level sorts, custom lists, filters and the fixes for lists that sort in the wrong order.
Quick answer: sort and filter in Excel
| Task | Where to find it |
|---|---|
| Sort one column A to Z | Select a cell in the column, then Data > Sort & Filter > Sort A to Z |
| Sort one column Z to A | Select a cell in the column, then Data > Sort & Filter > Sort Z to A |
| Sort by several columns | Data > Sort & Filter > Sort, then Add Level |
| Filter a list | Select a cell in the range, then Data > Filter |
| Clear all filters | Data > Clear |
| Remove the filter arrows | Data > Filter |
Sort a list by one column
- Select a single cell in the column you want to sort.
- Go to the Data tab and find the Sort & Filter group.
- Select the A to Z button for ascending order or the Z to A button for descending order.
Excel sorts the whole range around that column, and a first row of headings is fine to include.
| Data type | Ascending option | Descending option |
|---|---|---|
| Text | Sort A to Z | Sort Z to A |
| Numbers | Sort Smallest to Largest | Sort Largest to Smallest |
| Dates or times | Sort Oldest to Newest | Sort Newest to Oldest |
Sort by more than one column
- Select any cell in the data range.
- Go to Data > Sort & Filter > Sort.
- In the Sort by box, choose the first column.
- Under Sort On, choose Cell Values, Cell Color, Font Color or Cell Icon.
- Under Order, choose A to Z, Smallest to Largest, Oldest to Newest or Custom List.
- Select Add Level and repeat for each extra column.
Microsoft says you can sort by up to 64 columns.
Use Copy Level to duplicate an entry, Delete Level to remove one, and the Up and Down arrows to change which level sorts first.
Sort by cell color, font color or icon
Choose Cell Color, Font Color or Cell Icon under Sort On, then pick the specific color or icon under Order.
Choose On Top or On Bottom to place those cells.
Excel has no default color or icon order, so you must define the order each time you sort.
Sort by a custom list such as High, Medium, Low
- Type the values in the order you want, top to bottom, in a column.
- Select that range.
- Go to File > Options > Advanced > General > Edit Custom Lists.
- Select Import, then select OK twice.
- Open Data > Sort & Filter > Sort, choose your column, and under Order select Custom List.
- Choose your list and select OK.
Custom lists work only with values, not formats, and a list entry cannot start with a number.
Sort with case sensitivity or from left to right
For a case-sensitive sort, open Data > Sort & Filter > Sort, select Options, check Case sensitive and select OK twice.
To sort columns instead of rows, convert any table to a range first with Table Tools > Convert to range.
Then open Sort, select Options and choose Sort left to right under Orientation.
Filter a list
- Select any cell in the range.
- Go to Data > Filter.
- Select the arrow in the column header.
- Choose Text Filters or Number Filters, then a comparison such as Between.
- Enter your criteria and select OK.
In an Excel table, filter arrows appear in the header automatically.
- Select the header arrow of the column you want to filter.
- Clear Select All, then check only the values you want to display.
- Select OK.
The arrow then changes to a Filter icon, which you can select to change or clear the filter.
Use Advanced Filter for complex criteria
Advanced Filter lives at Data > Sort & Filter > Advanced.
Build a criteria range in blank rows above the list, with column labels that match your list headers, and leave at least one blank row between them.
Criteria on the same row must all be true, while criteria on different rows work as either-or.
Choose Filter the list, in-place to hide non-matching rows, or Copy to another location to place the matches elsewhere on the sheet.
Clear or remove filters
| Goal | Steps |
|---|---|
| Clear one column | Select the Filter button in the heading, then Clear Filter From the column name |
| Clear all filters on the sheet | Data > Clear |
| Remove the arrows entirely | Data > Filter, or press Alt + D + F + F |
You cannot remove the filter from a single column, because filters are either on for the whole range or off.
Reapply a filter or sort
Go to Home > Editing > Sort & Filter > Reapply after you change the data.
You also need it when a date filter is dynamic, such as Today or This Week, or when formula results change after a recalculation.
Microsoft notes that you cannot clear a sort and restore the previous order.
To keep that option, add a column of incrementing numbers before sorting, then sort on that column to get your original order back.
Fix a list that sorts in the wrong order
| Problem | Fix |
|---|---|
| Numbers sort after or among text | Numbers stored as text sort separately, so apply a Number format (Ctrl + 1 > Number tab) |
| Names with leading spaces sort oddly | Delete the spaces or use the TRIM function |
| Some rows do not move | Hidden rows and columns do not move, so unhide them before sorting |
| Results change after editing | Formula results can change, so reapply the sort |
| Headers sorted as data | Home > Editing > Sort & Filter > Custom Sort, then check or clear My data has headers |
| Order seems wrong for your language | Sort order depends on locale, so check Regional Settings on Windows |
Blank cells always sort last, in both ascending and descending order, but cells that contain only spaces are not blank.
Related Excel guides
After sorting, you may want to remove duplicates in Excel or freeze the header row so it stays visible.
If numbers sort like text, see our guide to converting numbers stored as text, and to split a name column first use Text to Columns.
Official sources: Sort data in a range or table, Filter data in a range or table and Reapply a filter and sort, or clear a filter.