Excel reference

Filters & Sorting

Quick answer

Not a function, two tools. Filter hides rows that don't match a condition; Sort reorders every row by a column. Neither one calculates anything.

Data → Filter, then per column: Equals · Does not equal · Greater/Less than · Contains · Data → Sort: pick a column, Ascending or Descending

Filter and Sort are easy to lump together since they both live under the Data tab and both reorganize how a table looks, but they do genuinely different things underneath. A filter never deletes, moves, or overwrites anything: it only changes which rows are currently visible, and turning the filter off brings every hidden row straight back exactly as it was. Sort is different; it actually reorders the rows on the sheet, though nothing about any individual row is added, removed, or changed, just rearranged.

Text fields get Equals, Does not equal, and Contains for filtering, and always sort alphabetically; numeric fields add Greater than, Less than, and their "or equal to" variants, and sort numerically. When a sort has ties, two rows sharing the same value in the sorted column, both Excel and LearnExcel use a stable sort, so tied rows keep their original relative order rather than being shuffled.

Syntax

Data → Filter, then per column: Equals · Does not equal · Greater/Less than · Contains · Data → Sort: pick a column, Ascending or Descending
ArgumentDescription
FieldRequired for Filter. The column the filter rule watches.
OperatorRequired for Filter. Equals, Does not equal, Contains for text; those plus Greater/Less than (or equal to) for numbers.
ValueRequired for Filter. What the operator compares each row's value in that field against.
Column, DirectionRequired for Sort. Which column to sort by, and Ascending (A→Z / smallest→largest) or Descending (Z→A / largest→smallest).

A real example: isolating one region without touching the data

A quick way to focus on one region's rows without deleting or moving anything else on the sheet:

Field: Region · Equals "West"

Every other region's row is simply hidden, not removed; clearing the filter afterward brings the full table straight back with nothing changed underneath.

Worked examples

Filter: exact match
AB
1RegionSales
2West320
3East210
Field: Region · Equals "West" → Row 2 stays visible, row 3 grays out
Filter: a numeric threshold
AB
1ProductRevenue
2Widget150
3Gadget320
Field: Revenue · Greater than 200 → Row 3 stays visible, row 2 grays out
Sort: descending by number
AB
1ProductRevenue
2Widget150
3Gadget320
Column: Revenue · Descending → Gadget (320) moves above Widget (150)

Common mistakes

  • Reaching for Equals when the real condition is a range. Greater than / Less than (or Between, back in the Conditional Formatting toolkit) is the right one for a threshold.
  • Forgetting Contains is a substring search, not an exact match. It's the right choice when only part of a name is known, or a whole product line shares one word.
  • Filtering (or sorting by) the wrong column when a plausible-looking but irrelevant one sits right next to the real one. Read the requirement, not just the nearest number.
  • Confusing Sort with the SORT() array formula from Array Formulas. Sort physically reorders the sheet's own rows; SORT() leaves the source alone and returns a separate sorted list elsewhere.

Related functions

Try it yourself

A free, graded practice exercise using this exact function: instant feedback, no signup required.

Practice filtering and sorting →