How to Sort and Filter Data in Excel
To sort in Excel, select your table and use Data > Sort; to filter, use Data > Filter and pick which rows to show. Sorting reorders your data, filtering hides rows without deleting them. Here is how to do both, step by step.
Sorting and filtering are the two fastest ways to make sense of a long list in Excel. Sorting reorders the rows — alphabetically, or from highest to lowest. Filtering hides the rows you do not want to see right now, without deleting anything. Learn both and even a huge sheet becomes easy to read.
How to sort your data
- Click any cell inside your table — Excel detects the surrounding data automatically.
- Open the Data tab and click A→Z or Z→A to sort by the current column.
- To sort by more than one column, click Sort instead — a dialog opens where you can add levels.
- In the Sort dialog, keep "My data has headers" ticked, choose the column, and set the order. Click "Add Level" for a second column (for example, sort by Region, then by Sales).
How to filter your data
- Click any cell in your data.
- On the Data tab, click Filter. A small drop-down arrow appears on every header.
- Click the arrow on the column you want to filter.
- Tick or untick values to choose what to show, or use "Number Filters" / "Text Filters" for rules like greater than, contains, or between. Click OK.
Filtering only hides rows — your data is untouched, and any hidden rows come straight back. To clear one column's filter, open its arrow and choose "Clear Filter". To switch filtering off entirely, click Filter again on the Data tab.
Sort vs filter: which to use
| Sort | Filter | |
|---|---|---|
| What it does | Reorders the rows | Hides rows you do not want |
| Changes the data? | Yes, the order changes | No, rows are only hidden |
| Best for | Ranking, alphabetizing | Focusing on a subset |
Sorting and filtering work best on clean data. Clear out repeats first with remove duplicates in Excel, and freeze the header row so your column titles stay visible while you scroll. You can do the same task in Google Sheets with sort and filter in Google Sheets.
Frequently asked questions
What is the difference between sorting and filtering in Excel?
Sorting reorders every row — for example, alphabetically or highest to lowest. Filtering hides the rows you do not want to see, without changing or deleting anything. Use sorting to rank data and filtering to focus on part of it.
How do I sort by more than one column in Excel?
On the Data tab, click Sort to open the Sort dialog, then use "Add Level" to stack columns. Excel sorts by the first level, then breaks ties with the next — for example, sort by Region, then by Sales within each region.
Why did sorting mix up my rows?
You probably selected a single column instead of the whole table. Sorting one column moves only its values while the rest stay put. Click one cell and let Excel take the full table, or select the entire range with headers so whole rows move together.
What is the keyboard shortcut for filter in Excel?
Press Ctrl+Shift+L to turn AutoFilter on or off. It adds or removes the drop-down arrows on your headers instantly, without going to the Data tab.