Excel Sorting and Filtering
Sorting rearranges the rows in a table into a meaningful order, while filtering temporarily hides the rows you don't need so you can focus on a smaller slice of your data.
Sorting vs. Filtering
Sorting and filtering solve two different problems. Sorting changes the order of every row in your table - for example, arranging a list of employees from the highest salary to the lowest. Filtering leaves the row order untouched but hides any row that doesn't match a condition you set, such as showing only employees in the Marketing department. You can combine both: filter down to the rows you care about, then sort that smaller set.
Sorting a Single Column
- Click any cell inside the column you want to sort.
- Open the Data tab and look in the Sort & Filter group.
- Click the A-Z button to sort ascending, or Z-A to sort descending.
- For a numeric column, the same two buttons sort smallest-to-largest or largest-to-smallest.
Sorting by Several Columns at Once
A single-click sort is fine for one column, but real spreadsheets often need a tie-breaker. Imagine an order list you want sorted by Region first, and within each region sorted by Order Date. Open Data > Sort to build this with multiple levels: the first level decides the main order, and each 'Add Level' becomes a tie-breaker for rows that are equal on the levels above it.
Building a Two-Level Sort
1. Select any cell in the table
2. Data tab > Sort
3. Sort by: Region Order: A to Z
4. Click 'Add Level'
5. Then by: Order Date Order: Oldest to Newest
6. Click OKTurning On Filters
Select any cell in your table and press Ctrl+Shift+L, or click Filter on the Data tab. A small dropdown arrow appears in every header cell. Clicking an arrow opens a checklist of every unique value in that column - unchecking a value hides all rows containing it. The same menu also offers Text Filters, Number Filters, or Date Filters with conditions like 'greater than', 'begins with', or 'between'.
- Text Filters - conditions such as 'Begins With', 'Contains', or 'Ends With'
- Number Filters - conditions such as 'Greater Than', 'Between', or 'Top 10'
- Date Filters - quick picks like 'This Week', 'Last Month', or 'Year to Date'
- Filter by Color - shows only rows with a specific cell or font color