Skip to content
3 min fix 5 min read Recently reviewedBeginner
Quick Answer

Click any cell inside your data, go to the Data tab, and click the Filter icon (the funnel). Dropdown arrows will appear on your column headers, allowing you to sort A-Z or hide specific rows.

How to Sort and Filter Data in Excel

Estimated Time to Fix: 3 minutes

Applies to: Microsoft Excel (Microsoft 365, Excel 2021, Excel 2019, Excel for the web)
Article Type: How-To
Last Updated: 2026-07-16

Summary

Sort data alphabetically or by value and use filters to show only the rows you need. Sorting rearranges your data; filtering hides rows that don't match your criteria without deleting them.

Prerequisites

  • Microsoft Excel (desktop or web).
  • A spreadsheet with data in rows and columns (headers in the first row work best).

Instructions

1. Sort Data by a Single Column

Arrange your data alphabetically, numerically, or by date.

  1. Click any cell in the column you want to sort by.
  2. Go to the Data tab on the ribbon.
  3. Click Sort A to Z (↑ ascending) or Sort Z to A (↓ descending).
    • For numbers, these become Smallest to Largest and Largest to Smallest.
    • For dates, they become Oldest to Newest and Newest to Oldest.
  4. The entire table rearranges based on that column.

TIP

Excel moves entire rows together when sorting — your data stays intact. If you accidentally scramble something, press Ctrl + Z immediately to undo.

2. Sort by Multiple Columns

Sort by one column first, then by another within those groups.

  1. Click any cell in your data.
  2. Go to the Data tab and click Sort.
  3. In the Sort dialog, set the first sort level (for example: Sort by = Department, Order = A to Z).
  4. Click Add Level to add a second sort (for example: Then by = Last Name, Order = A to Z).
  5. Click OK.

The data is sorted by department first, then alphabetically by last name within each department.

3. Add Filters to Your Data

Add dropdown arrows to column headers so you can show or hide specific rows.

  1. Click any cell in your data.
  2. Go to the Data tab and click Filter (or press Ctrl + Shift + L).
  3. Dropdown arrows (▼) appear on every column header.
  4. Click the dropdown arrow on the column you want to filter.
  5. Uncheck Select All, then check only the values you want to see.
  6. Click OK.

Only the matching rows are displayed. The other rows are hidden (not deleted) — you can bring them back at any time.

If you find yourself switching filters on for the same data every time you open the file, convert the range into a table instead: press Ctrl + T and the filter buttons become permanent, the header row stays visible while you scroll, and new rows are included automatically. See How to Format Data as a Table in Excel.

4. Use Text and Number Filters

Apply more specific filter conditions beyond simple checkbox selection.

  1. Click the filter dropdown arrow on a column.
  2. Hover over Text Filters (for text columns) or Number Filters (for number columns).
  3. Select a condition like Contains, Greater Than, Between, or Top 10.
  4. Enter the criteria and click OK.

Only rows matching the condition are shown.

TIP

Date filters are especially powerful — you can filter by this week, last month, this quarter, or a custom date range. Click the filter dropdown on a date column and hover over Date Filters to see all options.

5. Clear Filters

Remove filters to see all your data again.

  1. Go to the Data tab and click Clear (next to the Filter button). All hidden rows reappear.
  2. To remove the filter dropdowns entirely, click Filter again (or press Ctrl + Shift + L).

Troubleshooting

WARNING

If your formulas (like SUM or AVERAGE) give unexpected results after filtering, they may be including hidden rows. Use SUBTOTAL instead of SUM=SUBTOTAL(109, A2:A100) sums only visible rows.

Symptom / ErrorPotential CauseSolution
Sort rearranges some rows but not othersData has blank rows in the middleRemove blank rows so Excel recognizes the data as one continuous table.
Filter dropdown shows only a few valuesAnother filter is already active on a different columnClick Data > Clear to remove all filters first, then re-apply.
Sorting mixes up data across columnsExcel selected only one column instead of the full tablePress Ctrl + Z to undo. Select the entire data range before sorting, or convert it to a Table first (Ctrl + T).
This operation requires the merged cells to be identically sizedMerged cells inside the sort rangeSorting moves whole rows, and a merged block spans rows that cannot move independently. Unmerge the range first — see How to Wrap Text and Merge Cells in Excel.
Filter arrows don't appear on header rowFirst row not recognized as headersGo to Data > Sort and check My data has headers in the dialog.
Numbers sort as text (1, 10, 2, 20...)Column formatted as text instead of numberChanging the format alone does not re-read the existing values — see How to Fix Numbers Stored as Text in Excel.