Sort & filter practice

Sorting puts the rows in the order a question needs. Filtering hides the rows it doesn’t. Both keep every row in one piece.

click to change

Point at a step to see the sheet right after it.

A2:A6 = ORD-107, ORD-102, ORD-104, ORD-101, ORD-103 The biggest order is on top. For numbers, Z to A means largest first, and every row moved with its total.

“Which was the biggest order?” “Can I see just the North region?” Without sort and filter, the answer is scrolling and reading, or worse, sorting one column on its own and scrambling every row in the sheet.

Below is an order sheet before a sales meeting. You sort it two ways, then filter it down to what each manager asks for, and clear the filters again. After that, each habit is played out on a small sheet where you can make the classic mistakes yourself.

Lesson

This is Witsheet, Witsy’s in-browser spreadsheet. It works like Excel and checks each step as you go.

Sort from one cell, not the column

Click one cell in the column you want to sort by, then Sort & Filter. Excel takes the whole table around that cell and moves each row as one piece, so an order keeps its region, its rep and its total.

A2:D2 = ORD-107, North, Marcus Webb, 1490 The top row is still one order: ORD-107 brought its region and rep with it. One cell in the column is all a sort needs.

click to change Sort Z to A

Point at a step to see the sheet right after it.

click D3 select
What’s selected when you sort. One cell sorts the whole table; a selected range sorts only itself.

Select the whole column first and the sort is about that column alone. Excel warns you and offers to expand the selection; continue with the current selection, and every value ends up beside someone else’s row. Undo straight away if it happens.

Filters hide rows, and they stack

Sort & Filter → Filter puts a dropdown on every column header. Untick values there and their rows are hidden: nothing is deleted, and the row numbers turn blue and skip. Filters on different columns stack, so “North orders by Marcus” is two dropdowns, not a formula.

A2:A6 = ORD-101 North, and then Aino: one row passes both. The funnels on the two header buttons are how you can tell, later, that filters are on.

click to change click to change

Point at a step to see the sheet right after it.

filter B to North region
The Region dropdown: the regions left ticked.
filter C to Aino Virtanen rep
The Rep dropdown, a second filter on top of the first.

A filter left on looks like missing data to the next person who opens the sheet. Look for a funnel on a header button, and clear it from the same dropdown or with Sort & Filter → Clear.

SUM still counts the hidden rows

A filter hides rows from view, not from SUM. To total only what’s showing, use SUBTOTAL with 109, its code for a sum that skips hidden rows, or read the sum in the status bar.

D7 = 3210 SUBTOTAL with 109 adds only the rows the filter shows. Change the filter, and the total follows it.

= click to change
SUBTOTAL(109,D2:D6) fn
What adds up the Total column, with the sheet filtered to North.

Keep the headers out of the sort

Excel spots a header row and leaves it on top. When it can’t tell, as with headers that look like data, the Sort dialog’s “My data has headers” box decides. Untick it by mistake and the headings are sorted in with the rows, landing somewhere in the middle.

Download the sort and filter practice sheet

To keep practicing in your own Excel, download the workbook: 150 employees across departments and offices. Sort by start date, filter to one office, find who has served longest. The tasks sheet walks you through it.

Employee directory

150 employees across departments and offices, with start dates and salaries. Practice lookups by ID, IF logic on salary bands, sorting, filtering, and date arithmetic.

150 rows · Employee ID · Full Name · Department · Office · Start Date · Annual Salary

Free · fictional data · opens in Excel and Google Sheets

Learn the rest of Excel the same way

Witsy’s Excel course teaches a few hundred small skills, called Wits, the way this page teaches sort and filter: in a real spreadsheet, a step at a time. The placement test finds the ones you already have.

Your Wit map

Test your spreadsheet Wits.

Take a few minute test to see how good you actually are with spreadsheets. Witsy creates a map of the Wits you should learn next.

Take the placement test Or just start learning →
new unproven weak mid strong very strong super strong