Sorting puts rows in a useful order, and filtering hides the rows you do not need right now. Sorting rearranges whole rows, and a filter only hides them. Both are easy to get wrong in small ways, which this page covers.
Sorting without breaking rows
Click one cell in the column you want to sort by and use Data > Sort. Because you selected a single cell, Excel takes the whole neighbouring block of data and moves each row as a unit. That is what you want. Sorting one column alone would shuffle it against the other columns and mix up your records, so never select just one column of a larger list.
Check that "My data has headers" is ticked, or the header row is sorted into the data. A blank row or column inside the list ends the block, so Excel may only sort part of it.
Several levels and custom orders
In the Sort dialog, Add Level lets you sort by region first, then by sales within each region. Rows that tie on the first level are ordered by the second. You can sort by as many as 64 columns.
Alphabetical order is wrong for some labels. High, Medium and Low would sort as High, Low, Medium. Choose Custom List in the Order box and define your own sequence. You can also sort by cell colour or font colour, which is handy after conditional formatting.
In an ascending sort Excel puts numbers first, then text, then logical values and errors, with blanks last. Numbers stored as text sort with the text, which is a common reason a list looks out of order. Mixed columns are the usual cause of surprises, so convert or clean them first.
Filtering a list
Press Ctrl+Shift+L to switch AutoFilter on. Each header gets a drop-down with checkboxes, plus filters for text (contains, begins with), numbers (greater than, top 10) and dates (this month, next quarter). You can also filter by cell or font colour. Filters on different columns are additive: each one narrows the rows left by the previous one, so a row stays visible only if it passes all of them.
Hidden rows are not deleted. A column with an active filter shows a funnel icon, and the row numbers turn blue. To clear one column choose Clear Filter in its drop-down; to clear everything press Ctrl+Shift+L again. A filter does not update by itself when you edit data, so use Reapply (Ctrl+Alt+L) after changes.
Keep each column to one kind of data. Excel offers only one set of filters per column and picks the kind that is most common there, so a column of mostly text with a few numbers shows text filters. Only one filtered range per sheet works at a time, and a drop-down lists at most the first 10,000 distinct items.
Totals on filtered data
SUM adds hidden rows too, so a total under a filtered list will not match what you see. SUBTOTAL fixes that: =SUBTOTAL(9,C2:C100) leaves out the rows that a filter has hidden. Function numbers 1 to 11 still count rows you hid by hand; 101 to 111 skip those too, so =SUBTOTAL(109,C2:C100) adds only what you can see.
Tip: if you may want to undo a sort later, add a numbered column first. Sorting by it restores the original order.