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

TaskWhere to find it
Sort one column A to ZSelect a cell in the column, then Data > Sort & Filter > Sort A to Z
Sort one column Z to ASelect a cell in the column, then Data > Sort & Filter > Sort Z to A
Sort by several columnsData > Sort & Filter > Sort, then Add Level
Filter a listSelect a cell in the range, then Data > Filter
Clear all filtersData > Clear
Remove the filter arrowsData > Filter

Sort a list by one column

  1. Select a single cell in the column you want to sort.
  2. Go to the Data tab and find the Sort & Filter group.
  3. 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 typeAscending optionDescending option
TextSort A to ZSort Z to A
NumbersSort Smallest to LargestSort Largest to Smallest
Dates or timesSort Oldest to NewestSort Newest to Oldest

Sort by more than one column

  1. Select any cell in the data range.
  2. Go to Data > Sort & Filter > Sort.
  3. In the Sort by box, choose the first column.
  4. Under Sort On, choose Cell Values, Cell Color, Font Color or Cell Icon.
  5. Under Order, choose A to Z, Smallest to Largest, Oldest to Newest or Custom List.
  6. 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

  1. Type the values in the order you want, top to bottom, in a column.
  2. Select that range.
  3. Go to File > Options > Advanced > General > Edit Custom Lists.
  4. Select Import, then select OK twice.
  5. Open Data > Sort & Filter > Sort, choose your column, and under Order select Custom List.
  6. 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

  1. Select any cell in the range.
  2. Go to Data > Filter.
  3. Select the arrow in the column header.
  4. Choose Text Filters or Number Filters, then a comparison such as Between.
  5. Enter your criteria and select OK.

In an Excel table, filter arrows appear in the header automatically.

  1. Select the header arrow of the column you want to filter.
  2. Clear Select All, then check only the values you want to display.
  3. 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

GoalSteps
Clear one columnSelect the Filter button in the heading, then Clear Filter From the column name
Clear all filters on the sheetData > Clear
Remove the arrows entirelyData > 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

ProblemFix
Numbers sort after or among textNumbers stored as text sort separately, so apply a Number format (Ctrl + 1 > Number tab)
Names with leading spaces sort oddlyDelete the spaces or use the TRIM function
Some rows do not moveHidden rows and columns do not move, so unhide them before sorting
Results change after editingFormula results can change, so reapply the sort
Headers sorted as dataHome > Editing > Sort & Filter > Custom Sort, then check or clear My data has headers
Order seems wrong for your languageSort 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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *