Sort By Column in Google Sheets (3 Easy Ways)

Today, we are going to discuss how to sort by column in Google Sheets. We discuss three unique methods, each with their respective pros and scenarios where they can be utilized.

But before that, let’s look at the basics of sorting in Google Sheets.


Sort Basics in Google Sheets

Let’s first understand how sort works in Google Sheets. For our example, we will sort the following column of data.

basics table - sort by column in google sheets

Fundamentally, the sort function of Google Sheets is called Sort Range. We can find this under the Data tab of the toolbar (after a sorting range is selected.

navigating to sort range

Or by right-clicking over the selected cells.

Right-Click > View more cell actions > Sort range

right clicking to open sort range

Here, we have two choices:

  1. Sort range by Column (A to Z): Ascending order
  2. Sort range by Column (Z to A): Descending order

For our example, we have selected option 1. The result:

result of sort range in ascending order - sort by column in google sheets

This covers the fundamentals of sorting in Google Sheets. In a practical scenario, we often have to sort more than one column as our table and datasets usually have multiple of them. This brings us to the topic of our article today, how to sort by column in Google Sheets.


3 Ways to Sort By Column In Google Sheets

To show our processes, we have created the following table where we can sort multiple columns by one or many columns.

main table for sort by column in google sheets


1. Sort By Column Using Sort Range

Our first method of sorting by column in Google Sheets will use the built-in Sort range function, the advanced version of it to be precise.

We want to sort the table in the descending order of products sold (highest Sold first).

We go through this process step-by-step:

Step 1: Select the table. We have included the table headers.

whole table selected

Step 2: Navigate to Sort range’s advanced options. Data > Sort range > Advanced range sorting options

navigating to advanced range sorting options of sort range

This should open the Sort range window with some advanced options for us to utilize.

the sort range window with options for sort by column in google sheets

Step 3: Here, we set the following conditions:

  • Check the Data has header row option. Since our selection included the table headers, this option must be checked if we want to avoid errors. This will also make the headers appears as Sort by conditions.
  • Sort by: Sold. Our column selection by which the table will be sorted.
  • Z to A: The descending order condition. Highest to the lowest down the column.

conditions selected for sort range

Step 4: Click Sort.

sort by column in google sheets using sort range

As we have sorted the Sold column, the rest of the rows of the table has also been sorted accordingly.


Sort by Multiple Columns

Now, we will look at how we can apply two levels of conditions to our sort by columns. We will sort the table by their Shop names first then according to the amount Sold.

Step 1: Open the advanced Sort range window.

the sort range window

Check the Data has header row option if your selection includes headers.

Step 2: We set our first condition, the Shop names by ascending order.

sort by shop name in ascending order

Step 3: We now add the second column condition. Click on the Add another sort column button.

highlighting the Add another sort column button

Our second condition is Sold in descending order.

second sort condition of sold in descending order

Step 4: Click Sort.

sort by multiple columns in google sheets using sort range

We have successfully sorted our table by the Shop names first and then the amount Sold.

This method is viable for any size of tables and for as many conditions as you can apply.


Similar Readings


2. Sort by Column Using Filter

This next method is a bit unorthodox, but it still gets the job done. Here, we will sort our table by column using the Filter function of Google Sheets. We will once again sort the entire table by the Sold column in descending order.

Step 1: Select the whole table and navigate to the Filter function on the Toolbar.

navigating to filter from the toolbar

This creates a filter on the table headers.

filters created in each table header

Step 2: Select the filter of the Sold table. Select Sort Z to A.

sorting sold column in descending order with filter

Step 3: Click OK. Our result:

sort by column in google sheets using filter


3. Sort By Column Using a Formula

Our final method combines the idea of our last two and gives us something much more dynamic. That is, sorting by column using the SORT function of Google Sheets.

The SORT function syntax:

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

SORT function syntax

To work this method, we must create a separate table and populate it with our new sorted values.

Step 1: Create a new table and start the formula =SORT(

applying SORT formula

Step 2: Select the range of values of the original table. In our case. it is B3:D12.

Step 3: Our sort_column value will be 3. Because the Sold column is in the third position of our selection.

Step 4: The is_ascending condition will be FALSE, as we want the sort to be in descending order.

adding column number and ascending condition to the SORT function

Step 5: Close parentheses and press ENTER.

=SORT(B3:D12,3,false)

sort by column in google sheets using SORT function

We called this method dynamic because as we change the data within the source table, the sorted table data will also change accordingly:

sort by column in google sheets dynamically using SORT function animated

Read More: How to Sort by Value in Google Sheets (With Examples)


Sort by Multiple Columns

With the SORT function, we can add multiple column conditions. Let’s try it out with the condition we have used in method 1 of this article: sort the table by their Shop names first then according to the amount Sold.

Our formula with the two conditions:

=SORT(B3:D12,2,true,3,false)

sort by multiple columns in google sheets

Read More: How to Sort by Multiple Columns in Google Sheets (3 Ways)


Final Words

We hope that all the methods we have discussed of how to sort by column in Google Sheets come in handy in your day-to-day tasks.

Please feel free to leave any queries or advice you might have for us.


Related Articles for Reading

Mehrab Imtiaz

Mehrab Imtiaz

Mehrab Imtiaz is a Technical Writer for officewheel.com specializing in everything Google Sheets. Mehrab has always had a profound passion for writing and with his experience with MS Excel and Google Sheets throughout his career, it seems to be a great match when it comes to dishing out tips and tutorials for all to enjoy.

We will be happy to hear your thoughts

Leave a reply

OfficeWheel
Logo