How To Sort in Google Sheets [2 Easy Methods]

It’s always easier to work with data that has been organized and sorted in a particular order. This is why the Sort function in Google Sheets is so useful. But it’s also not the only way you can sort. Follow along with this guide to learn how to sort in Google Sheets using a range of different methods.

How To Sort in Google Sheets

  1. Select a cell in the column you wish to sort by.
  2. Highlight the entire range by clicking and dragging from the initial cell.
  3. Navigate to “Data” > “Sort range” and select the order you wish to sort by.

What Is the Sort Function in Google Sheets Used For?

As the name suggests, the Sort Google Sheets function helps us sort data in a range of cells and returns the sorted output in a new cell range.

This function lets us sort data in ascending or descending order. It also lets you sort data by one or multiple column criteria.

The Difference Between Sort Menu and SORT Function

Google Sheets provides two ways to sort data:

  1. Use the “Sort” menu (which can be found under the “Datamenu).
  2. Use the Google Sheets SORT formula function.

While the Sort menu can be accessed with a couple of clicks, the SORT function lets you enter the formula in the formula bar, giving you more control over the sorting Google Sheets processes.

The main difference between the above two methods is that the Sort menu works on and changes the original data range.

How to sort in Google Sheets—Range sorted using the Sort menu


The SORT function, on the other hand, displays the sorted data into a new data range, thereby keeping the original data unchanged.

  1. Range sorted using the SORT function


You can do it alphabetically or in any ascending or descending order. For example, you can use these methods to sort by date.

How To Sort a Google Sheet in Entirety

You already know how to sort a column in Google Sheets. Now let’s look at sorting a whole sheet. You can use the Sort menu to do so. Here’s how to sort data in Google Sheets using the Sort menu:

Sort an entire sheet


  1. Select the column header of the column you wish to sort the sheet by.
  2. Navigate to “Data” > “Sort sheet.”
  3. Select how you would like to sort the sheet.

Syntax of the Sort Function in Google Sheets

The syntax for a SORT formula in Google Sheets is:

SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, …])
  • range: This refers to the group of cells that you want to apply the SORT function on (the cells that you want to sort).
  • sort_column: This is the main column by which you want to sort the data in the range.
  • is_ascending: This specifies if the range should be sorted in ascending or descending order of the sort_column. It can either be TRUE or FALSE, with a FALSE representing a ‘descending’ order.

The above three parameters are compulsory in a SORT function, but you can also add additional parameters if you want to sort the range by more criteria. In that case:

  • sort_column2: represents the secondary column by which you can sort the data in range.
  • is_ascending2: This specifies if we want to sort the range in ascending or descending order of sort_column2. This parameter can also be a TRUE or FALSE value.

You can add more [sort_columnX, is_ascendingX] pairs like this depending on the number of column criteria you need for sorting your data in the range.

Note: The sort_column can be specified either as a column index (a number representing the position of the column in the range) or as a reference (the range of cells in the column, e.g., A2:A5). The number of cells in sort_column should be equal to the number of rows in the range. Otherwise, the SORT formula returns an error.

How To Sort Cells in Google Sheets With the SORT Function (Examples)

Once you understand the syntax for the =SORT Google Sheets function, applying it is quite easy.

We will look at two ways that you can use the Google Spreadsheet SORT function:

  • When you want to sort by a single column
  • When you want to sort by multiple columns

You can also sort by row instead.

To explain both methods of Google Sheets sorting, we will use the following sample data. We are going to use the SORT function to sort the data shown below:

Data set for SORT function in Google Sheets


To help you see the differences between the original and sorted data, we will sort the above data and display it in the same sheet (in a neighboring cell range).

You can also enter the SORT formula in a new sheet and display the sorted data there.

Google Sheets Sort by Number Ascending With a Single Column Argument

When you want to sort by a single column, just the first three parameters of the SORT function syntax are enough to get the job done.

For example, from our sample data, we want to sort all the rows by Company Name (column A). This is an easy way to sort on Google Sheets. Here’s how to display the sorted data range starting from cell F2.

  1. Copy the data column headers and paste them onto the first row (cells F1 to I1 in our example).
    Copy the data headers before sorting
  1. In cell F2, type the following formula:
=SORT(A2:D8,A2:A8,TRUE) or =SORT(A2:D8,1,TRUE)
SORT formula in Google Sheets


  1. Press the “Return” key.
    Range sorted using the SORT function


You should now see the entire sorted data occupy the range from cell F2 to I8. Note that the result of the SORT function is dynamic.

The Google Sheets sort column in our formula is A2: A8, the company name. The rest of the columns will be sorted based on this column.

Any changes you make to the original data are reflected in the sorted output as well. If you’re looking to learn how to sort numbers in Google Sheets from highest to lowest, you should use FALSE instead of TRUE in the formula.

Also, note that you cannot make any changes to the sorted output. Attempting to do so will result in a #REF error.

The Google Sheets Sort Function with Multiple Columns

If you look at the sorted data now, you will notice that some of the company names are repeated.

Additionally, if you want to ensure that the rows are sorted further by descending order of Delivery date, whenever there’s a company name repeating, the SORT function simplifies that process too.

In this case, you can introduce the additional parameters into the SORT function. Here’s how to custom sort in Google Sheets with multiple parameters:

We can sort our data by company name and then sort by date using the formula:


In the above formula, we added two new parameters:

  • We set sort_column2 to column C2:C8 (The Delivery Date column).
  • We set is_ascending2 to FALSE since we want to sort in descending order of Delivery Date.
SORT multiple columns using formula


This gives the following result:

You’ll notice in the above figure that the data is first sorted in alphabetical order according to the Company Name.

Whenever there is a repetition of a name, the rows containing the repeated company names are then sorted in descending order of the Delivery date.

For example, the company name Krajcik-Lowe appears in three rows. These rows are then sorted with the latest dates appearing first and the older dates appearing last.

Final result where data is sorted based on multiple columns


You can further refine this search if you need to by adding more parameters, such as:

[sort_columnX, is_ascendingX]

How Many Columns Can I Sort?

You can add as many parameters and arguments to your columns as you’d like. In the above example, we used two SORT arguments to sort the data. You could use 3 or more with TRUE or FALSE parameters to further sort the data too.

How To Sort a Range (How To Sort by Multiple Columns)

You can also use the Sort menu to sort your range by multiple columns. Here’s how:

  1. Highlight the range of data that you want to sort.
  2.  From the toolbar, go to “Data.”
  3. Choose “Sort range” > “Advanced range sorting options.”
Choose Sort Range > Advanced range sorting options.


  1. Choose the first column you want to sort by in the sort by drop-down list.
Choose the first column you want to sort by in the sort by drop down.


  1. Click “Add another sort column” to choose the second column. You can continue by adding sorting levels and clicking this option.
Click Add another sort column to choose the second column.


  1. Click the “Sort” button to apply the sorting to the selected data.
Click the Sort button to apply the sorting to the selected data.

How To Sort in Google Sheets Using Filter

Google Sheets also has a powerful feature known as Filter that allows you to sort and view data based on specific criteria. You can filter data to focus on specific data subsets that meet certain conditions, making it easier to identify patterns, trends, and relevant information.

Here’s how to use the Filter to sort in Google Sheets:

  1. Select the data range.
Select the data range.


  1. Go to “Data” > “Create a filter.”
Go to Data > Create a filter option.


  1. Let’s say we want to sort by Product. Click on the filter icon in the product column.
Click on the filter icon in the product column.


  1. Choose the option “Sort A — Z.”
Choose the option Sort A - Z.


The data range will then be sorted according to the product column as shown below:

Sorted data range using filter


If you want Google Sheets to sort from highest to lowest, you can choose the option “Sort Z — A” instead.

Frequently Asked Questions

Can You Custom Sort in Google Sheets?

You can only sort from lowest to highest (A-Z) or highest to lowest (Z-A) in Google Sheets. However, you can set parameters for the SORT function from different columns if you want to customize some selected data.

How Do I Sort in Google Sheets but Keep Rows Together?

Here’s how to sort columns in Google Sheets without mixing data:

  1. Select a cell in the column you wish to sort by.
  2. Highlight the entire range by clicking and dragging from the initial cell.
  3. Navigate to “Data” > “Sort range” and select the order you wish to sort by.

How Do You Sort Data in Google Sheets?

The simplest way is with the Sort menu:

  1. Highlight the data you wish to sort.
  2. Click “Data” > “Sort (sheet or range) and choose how you want to sort the data.

How Do I Sort From Highest to Lowest in Google Sheets?

Here’s how to sort a Google sheet from highest to lowest:

  1. Select the range you wish to short.
  2. In the Sort menu (Data > Sort), select “Sort by column X Z-A.”

How Do I Create a Custom Sort Order in Google Sheets?

You can use the SORT function instead of the Sort menu for custom sorting.

The SORT function uses the following syntax:

SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, …])

You can also use the SORTN function for more in-depth custom sorting. Or, combine SORT with the FILTER function in Google Sheets.

Wrapping Up

In this tutorial, I showed you how to sort in Google Sheets using single or multiple-column criteria.

The SORT function can be really helpful if you want to quickly sort and browse through your data without having to affect the original data.

We hope this tutorial has been helpful to you.


Most Popular Posts



Sumit is a Google Sheets and Microsoft Excel Expert. He provides spreadsheet training to corporates and has been awarded the prestigious Excel MVP award by Microsoft for his contributions in sharing his Excel knowledge and helping people.
Related Posts

Thanks for visiting! We’re happy to answer your spreadsheet questions. We specialize in formulas for Google Sheets, our own spreadsheet templates, and time-saving Excel tips.

Note that we’re supported by our audience. When you purchase through links on our site, we may earn commission at no extra cost to you.

Like what we do? Share this article!