If you want to reorder a range by one or more columns without touching the original data, the SORT function in Google Sheets is what you’re looking for. You give it a range and tell it which column to sort by, and it returns the sorted rows, which spill into the cells below.
In this article, I’ll walk you through how to use SORT with several examples, from a simple one-column sort to sorting by two columns at once.
SORT Function Syntax in Google Sheets
Here is the syntax of the SORT function.
=SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, ...])
- range – the data you want to sort.
- sort_column – the column to sort by, given as a number counting from the left of the range (1 for the first column, 2 for the second, and so on).
- is_ascending – TRUE sorts smallest to largest (or A to Z), FALSE sorts largest to smallest (or Z to A).
- sortcolumn2, isascending2 – optional extra column and direction pairs for breaking ties, applied in order.
When to Use SORT Function
- You want a sorted view of a table while keeping the original data in place and untouched.
- You need the order to update automatically whenever the source data changes.
- You want to sort by one column first and then break ties with a second column.
- You want to sort the output of another function, like a filtered list, in a single formula.
Example 1: Sort a Table by Score (Ascending)
Let’s start with the most common case, sorting a table from low to high.
Below is the dataset, a list of names in column A and their scores in column B, covering rows 2 to 6.

The goal is to reorder the whole table so the lowest score sits at the top and the highest at the bottom.
Here is the formula:
=SORT(A2:B6, 2, TRUE)

SORT looks at the second column (the scores) and arranges the rows in ascending order because the third argument is TRUE.
Dave sits at the top with the lowest score of 68, and Carol lands at the bottom with the highest score of 95. The names travel with their scores, so each row stays intact.
Example 2: Sort the Same Table Descending
This one is the flip of Example 1, putting the highest value first.
Below is the dataset, the same names and scores in A2 to B6.

The goal is to put the top scorer at the top of the list.
Here is the formula:
=SORT(A2:B6, 2, FALSE)

The only change from Example 1 is the third argument, now FALSE, which flips the direction to descending.
Carol moves to the top with 95 and Dave drops to the bottom with 68. Same data, opposite order.
Pro Tip: The is_ascending argument is optional and defaults to TRUE. So =SORT(A2:B6, 2) gives you the same ascending result as Example 1 with less typing.
Example 3: Sort Text Alphabetically
SORT handles text just as easily as numbers.
Below is the dataset, a list of city names in column A and a population figure in column B, in rows 2 to 6, entered in a jumbled order.

The goal is to sort the cities alphabetically by name.
Here is the formula:
=SORT(A2:B6, 1, TRUE)

This time the sort column is 1, the city names, and TRUE sorts them A to Z.
The cities come back in order as Austin, Boston, Chicago, Denver, and El Paso, each carrying its own population value along with it.
Example 4: Sort by Two Columns
Sometimes one column isn’t enough to settle the order, so you add a second sort key.
Below is the dataset, a table with a team color in column A, a player name in column B, and a points total in column C, covering rows 2 to 7.

The goal is to group the rows by team color first, then within each color list the highest scorer first.
Here is the formula:
=SORT(A2:C7, 1, TRUE, 3, FALSE)

How this formula works:
- The first pair,
1, TRUE, sorts by team color in ascending order, so all the Blue rows come before the Red rows. - The second pair,
3, FALSE, sorts by the points column in descending order, but only as a tiebreaker inside each color group. - The result groups Blue first (Tina, Vik, Zoe) then Red (Uma, Wes, Sam), with each group running from the highest points down.
You can keep adding column and direction pairs to sort by three or more keys if you need to.
Example 5: Sort a Filtered List
You can wrap SORT around another function to sort its output in one go.
Below is the dataset, a list of office supply items in column A and units sold in column B, in rows 2 to 7.

The goal is to keep only the items that sold more than 50 units, then sort those from highest to lowest.
Here is the formula:
=SORT(FILTER(A2:B7, B2:B7>50), 2, FALSE)

How this formula works:
- The inner FILTER keeps only the rows where the units sold in column B are greater than 50.
- SORT then orders that filtered set by the second column in descending order.
- Folders leads at 95, followed by Pads at 80, Clips at 62, and Ink at 55. Anything at or below 50 never makes it into the result.
This is a clean way to slim down a list and order it at the same time.
Tips & Common Mistakes
- Leave room for the spill. SORT writes its full result below the formula cell. If those cells already hold data, you get a #REF! error instead of the sorted list.
- The sort column is relative to the range, not the sheet. A sort_column of 2 means the second column inside the range you passed, not column B of the worksheet.
- The output stays linked to the source. Edit a value in the original range and the sorted result re-orders itself automatically. There is no need to redo the formula.
SORT gives you a live, sorted copy of your data without disturbing the original. Once you start nesting it with other functions, it does a lot more than just reorder a column.
Give it a try the next time your data needs to be in order.
List of All Google Sheets Functions
Related Google Sheets Functions / Articles: