How to Sort and Filter a Table in Excel Step by Step

Formulas & functions · Updated November 20, 2026

To sort and filter an Excel table, select a cell in it and use the arrow in a column header: choose a sort order, or select the values you want to display. For more control, use Data > Sort to sort by several columns, and use the filter menus to narrow results without deleting any rows.

Prepare the data before sorting

Sorting is safest when each row represents one complete record and each column contains one kind of information. For example, a sales table might have columns for Date, Customer, Region, and Amount. A sort should move each entire record together; sorting only the Amount cells would separate the figures from the customers and dates they belong to.

Make sure the first row contains clear, unique column headings, and avoid blank rows or columns inside the data. If the data is an ordinary range rather than an Excel table, click within it before sorting and check that Excel identifies the whole range. If Excel asks whether to expand the selection, choose that option to keep related columns together.

For a more reliable setup, convert the range to a table. Click inside the data and choose Insert > Table, confirm the range, and select My table has headers if the first row contains headings. In Windows, Ctrl+T opens the Create Table dialog. The resulting table has filter arrows in its header row and is designed to keep each record together during sorting.

Sort a table by one column

For a quick sort, click the dropdown arrow in the heading of the column you want to sort. Choose Sort A to Z for text, Sort Smallest to Largest for numbers, or Sort Oldest to Newest for dates. The reverse options sort in descending order. Excel reorders the table rows, not just the values in the selected column.

You can also click in the table and use Data > Sort A to Z or Data > Sort Z to A. The options change according to the selected column’s data type. A date column may offer oldest-to-newest choices, for instance, while a text column offers alphabetical choices. Check that the visible result matches the intended order, especially if the column contains mixed kinds of entries.

Sorting changes the order of records; it does not remove any. If you sort a Region column alphabetically, all the rows remain, but they appear grouped in alphabetical sequence. If you need the original order later, add an index column before sorting, fill it with sequential values, and sort by that column to restore the prior sequence.

Sort by multiple columns

Use the full Sort dialog when one column is not enough—for example, to sort a sales list first by Region, then by Customer, then by Date. Click a cell in the table and choose Data > Sort. In the dialog, confirm that My data has headers is selected, then set the first column under Sort by, choose what to sort on, and choose an order.

To add another level, select Add Level. Set the next column under Then by, and repeat if needed. Excel applies the first level as the main grouping and uses later levels to order rows within each preceding group. For the sales example, Region creates the main groups; Customer orders names within each region; Date orders each customer’s records.

Use the dialog’s Sort On setting to sort by cell values, cell color, font color, or a cell icon where applicable. The Order choices depend on the selected sort type. For text, you can choose A to Z or a custom list; for numbers, smallest to largest; and for dates, oldest to newest. Review the levels from top to bottom before clicking OK, since their sequence determines which sort is primary.

Filter rows with the header menus

A filter temporarily hides rows that do not meet the conditions you choose. Click the arrow in a table header, clear Select All, and select the values you want to keep visible. For example, in a Region column, select West and East to show only those regions. Click OK to apply the filter. The funnel icon in a filtered header indicates that the column is filtering the table.

Filter menus also provide useful controls for larger lists. Use the Search box to find a particular text value, then select it. For numbers, choose Number Filters to set conditions such as greater than, less than, or between. For dates, Date Filters offers date-based conditions; the menu may also show date groupings, such as months or years, depending on the data.

Filtering does not delete the hidden records. Clear a filter to show them again: open the relevant column menu and choose Clear Filter From [column name]. To clear filters across the table, use Data > Sort & Filter > Clear. In Windows, Ctrl+Shift+L toggles AutoFilter arrows for a selected range; a table already displays its header filters. On Mac, use Data > Filter if you need the menu command; shortcuts can differ with Excel version and keyboard settings.

Combine filters across columns

You can filter more than one column at a time. For example, filter Region to West and then filter Status to Open. Excel displays rows that meet both column filters, so the result is records that are in the West and are Open. The filter indicators remain visible in both headings, making it easier to see that multiple conditions are active.

Within a single column, selecting several values usually means show rows matching any of those values. Selecting West and East in Region therefore keeps either region. This is different from combining filters across columns, which narrows results to rows meeting the active conditions in each column. For more precise criteria within one column, use its Text Filters, Number Filters, or Date Filters menu; some custom filter dialogs let you combine two conditions with And or Or.

Search is useful for finding a value in a long checklist, but make sure the intended checkboxes are selected when you apply the menu. If the list contains many similar entries, such as West, West Coast, and Northwest, reading the selected values carefully avoids a filter that is broader or narrower than expected.

Why Excel tables make sorting and filtering easier

An Excel table is more than a formatted range. It gives the header row filter controls, applies consistent formatting, and makes it easier to work with data that grows over time. When you type in the row immediately below a table or paste adjacent data, Excel will often expand the table to include it. Check the table boundary when new records do not appear in a filter menu; a blank row or column can leave new data outside the table.

Tables also help prevent a common mistake: sorting one column while leaving other fields in place. When a sort is performed from a table header or with the table selected, Excel sorts complete records. If you work with an ordinary range, confirm the selection in the Sort Warning dialog and choose Expand the selection. Choosing Continue with the current selection can rearrange one column independently and corrupt the associations between fields.

Filtering a table is also convenient when new entries are added, because table filter controls apply to the table’s columns. Still, check that incoming data uses consistent values and formats. For example, a region typed as West with an extra space may appear as a separate item from West, and a date stored as text may not sort in calendar order.

Common sorting and filtering problems

  • Rows appear in the wrong order: Check for numbers or dates stored as text, mixed formats, or leading spaces. Excel may sort text that looks like a number alphabetically rather than numerically.
  • Some records are missing from the filter list: Confirm that the records are inside the table or selected range. Look for blank rows or columns that split the data, and inspect whether a filter is already active.
  • Only one column moved: Undo immediately with Ctrl+Z on Windows, then repeat the sort and expand the selection. On Mac, use Command+Z. Do not continue working on a table whose columns may no longer match.
  • A filter seems to miss a value: Check spelling, spaces, and inconsistent entries. Also confirm that more than one column is not filtering the results.
  • Blank entries behave unexpectedly: A filter menu may include a (Blanks) choice. Check whether the cells are truly empty or contain spaces or formulas returning an empty string; these cases may not behave identically.

If a sort or filter result seems suspicious, clear the filters and inspect the source values before making further edits. Sorting and filtering are views and arrangements of the existing records, not a substitute for cleaning inconsistent data.

Frequently Asked Questions

How do I sort an Excel table alphabetically?
Click the dropdown arrow in the text column’s header and choose Sort A to Z. Excel sorts the complete table rows while keeping each record together.

How do I filter a table to show only certain values?
Open the column’s header dropdown, clear Select All, select the values to show, and click OK. Other rows are hidden, not deleted.

Can I sort an Excel table by two columns?
Yes. Choose Data > Sort, set the primary column, select Add Level, and set the secondary column. Excel sorts by the second column within groups created by the first.

How do I remove a filter but keep the table?
Choose Clear Filter From in the filtered column’s dropdown, or choose Data > Sort & Filter > Clear to clear active filters. The table and its records remain.

Why does Excel sort 1, 10, 2 instead of 1, 2, 10?
The entries may be stored as text rather than numbers. Check the cell format and the underlying values, then convert the entries to numbers consistently before sorting.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.