Top ten reps
=SORTN(A2:D100, 10, 2, FALSE, 3) returns ten rows sorted by revenue column descending.
SORTN sorts a range and returns only the first N rows. You choose how many rows, which column drives the sort, and ascending or descending order. Leaderboards and best-seller reports use SORTN instead of manual sorting that goes stale.
Use SORTN for top ten lists, bottom performers, or largest invoices where the cutoff count is fixed.
Skip SORTN when you need all rows sorted. Use SORT instead. Complex tie-breaking may need QUERY with multiple ORDER BY columns.
Pass the full data array including headers if you want them in output.
Set n to how many rows to return after sorting.
Choose display_ties_mode when equal values should all appear or be cut off.
Pick the sort column index and TRUE for ascending or FALSE for descending.
Leave spill room for n rows plus header if included.
Refresh source data so SORTN rankings update on dashboards.
=SORTN(A2:D100, 10, 2, FALSE, 3) returns ten rows sorted by revenue column descending.
=SORTN(Stock!A:C, 5, 3, TRUE) shows five SKUs with smallest on-hand counts.
=SORTN(Grades!A:D, 15, 4, FALSE) lists top fifteen GPA rows for the dean list.
Build this without starting from a blank cell
Use a Better Sheets tool for SORTN, then watch a walkthrough when you want the full pattern.
Watch how SORTN works
Guides that explain SORTN in more depth.
Discover how to figure out the frequency of numbers, product IDs, text, emails and much more! Essential tips and tricks revealed.
Read post →Today’s tutorial will cover how to bring a value from other cells. How do you reference an array in a cell? Anika is a member of Better Sheets and she was the one who asked this question.
Read post →In this tutorial, we're going to orient users better in Google Sheets. We want to help not just ourselves but also anyone who’s going to use a spreadsheet that we have created.
Read post →FILTER returns only the rows from a range that meet one or more conditions. Conditions are boolean arrays the same height as the data. FILTER spills results automatically, so it replaced many INDEX/SMALL helper-column patterns for live subsets.
Read guide →UNIQUE extracts a deduplicated list from a column or table. Optional arguments control whether duplicates appear by row, by column, or with occurrence counts. It powers dropdown source lists, category tabs, and data cleanup without manual copy-paste.
Read guide →QUERY runs a SQL-like statement against a range of cells and returns a new table of results. You pass a data range, a query string with SELECT, WHERE, ORDER BY, and optional headers. It is the fastest way to filter, sort, group, and pivot sheet data without helper columns.
Read guide →SEQUENCE returns a grid of sequential numbers. You set how many rows and columns, the starting value, and the step between values. It replaces manual 1, 2, 3 fill patterns and pairs well with MAP, LAMBDA, and date math for generated row labels.
Read guide →Done reading about SORTN?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.