How to Sort in Google Sheets – Easy Guide for 2024

By

If you work with data in Google Sheets, sorting is a feature you would need quite often.

In this tutorial, you’ll learn how to sort in Google Sheets.

Sort in Google Sheets (Using In-built Sorting Functionality)

Suppose you have students marks data in a Google Sheet as shown below:

Sort Data in Google Sheets - Data Set 1 column

Now you can sort this data with names in alphabetical order or marks in ascending order.

How to Organize Alphabetically in Google Sheets

Here are the steps to sort the names in alphabetical order:

  1. Select the entire data set (A1:B11).
  2. Right-click anywhere in the selection and click on Sort Range.Sort Data in Google Sheets - Sort Range
  3. In the Sort Range dialog box:
    1. Check the box for ‘Data has header row’.Sort Data in Google Sheets - Data has Header row
    2. Select the column for which you want to sort. In this case, it’s the Names column.Sort Data in Google Sheets - sort by column
    3. Click on the Sort button.Sort Data in Google Sheets - sort button

This will sort the names in alphabetical order (along with the numbers).

Sort Data in Google Sheets - sorted data names

In the same way, you can also sort based on the marks. In that case, you need to select marks as the column to be used for sorting.

Google Sheets SORT Function with Multiple Columns

Suppose you have a similar data set, but now, you have the marks for each student for three tests (Test 1, Test 2, Test 3).

Sort Data in Google Sheets - three tests

Now you can do a multi-level sorting with this data set. In this case, you can first sort the data by name and then by Test. Let’s take a look at how to custom sort in Google Sheets that will group all the three test scores for each student.

To do this:

  1. Select the entire data set (A1:C31).
  2. Right-click anywhere in the selection and click on Sort Range.Sort Data in Google Sheets - multilevel - right click
  3. In the Sort Range dialog box:
    1. Check the box for ‘Data has header row’.Sort Data in Google Sheets - multilevel - data header
    2. Select the column for which you want to sort first. In this case, it’s the Names column.Sort Data in Google Sheets - multilevel - names
    3. Click on ‘Add another sort column’.Sort Data in Google Sheets - multilevel - add another
    4. In the ‘then by’ drop-down, select Test.Sort Data in Google Sheets - multilevel - test
    5. Click on Sort.Sort Data in Google Sheets - multilevel - sort button

This will sort the data first by the names and then by the test name.

Sort Data in Google Sheets - multilevel - result

Note: If you want to keep the original data intact, make a copy, and then perform the sorting on the copied data.

Sort Data in Google Sheets using the SORT Function

Google Sheet has a wonderful function that makes the sorting easy as pie – the SORT function.

Suppose you have the data set as shown below:

Sort Data in Google Sheets - Data Set 1 column

 

To sort this data using the SORT function, in cell C2, enter the formula: =SORT(A2:B11,1,TRUE)

As soon as you enter this formula and hit enter, it would automatically give you a sorted data range (as shown below):

Sort Data in Google Sheets - sort function

Here is how it works:

SORT function takes three arguments in the formula:

  • The range (A2:B11) which is to be sorted
  • The column based on which the sorting is to be done. In this case, it is column 1.
  • The order (ascending or descending). If this argument is TRUE, it sorts in the ascending order.

Note that you can sort multiple columns as well. In that case, you need to supply the column number and the sorting order.

Here are a few things you need to know before you use the SORT function in Google Sheets:

  • You can not delete a part of the result. If you have to delete it, you need to delete the entire result of the SORT function.
  • If there are any filled cells in the range that would be taken up by the SORT function, it would return an error.

Can Google Sheets Sort by Column?

In all the examples covered so far, we have seen how to sort alphabetically in Google Sheets with the data by rows.

How do I sort a column but keep intact rows in Google Sheets?

Unfortunately, there is no inbuilt functionality or function in Google Sheets that allow sorting by columns.

But here is a workaround that you can use – transpose the data (using the inbuilt functionality or using the transpose function)so that the rows become the columns in the columns become the rows.

Once you have transposed the data, sort using any of the methods covered above. once done, transpose it back so that you get the original data (which has now been sorted by columns).

I know it’s not an elegant solution, but it works!

Hot to Sort Data in Google Sheets Using the Sort Menu

Instead of using the SORT formula, you may want to use the sort tool from the menu in the top bar by navigating to Data>Sort sheet or Data>Sort range. But, what’s the difference between these two? Let’s take a look.

Sorting By Sheet – Using the Sort sheet tool will rearrange the entire spreadsheet by one column’s data.

Sorting by Range – Using the Sort range tool will only sort the data for a selected range within the spreadsheet. This is more useful for sheets with multiple data sets.

How to Sort a Google Sheet in Entirety

  1. Freeze the row that has the titles in it, this will stop it from being included
  2. Click the column you wish to sort the rows in – B in our example
  3. Navigate to Data>Sort sheet>Sort Sheet by column B and click

  4. The data should now be sorted in order from the selected column

How to Sort Data in Google Sheets Within a Range

  1. Select the cell range you wish to sort
  2. Navigate to Data> Sort range>Advanced range sorting options (if the column you wish to sort by is preselected you can just click it instead)
  3. Select which column you would like to sort and the order then click sort

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

Make sure you select the Z>A sort order when you use the built-in sort tools in Google Sheets

The Bottom Line

As you can see there are quite a few different ways you can sort in Google Sheets depending on your preferences.

I hope you found this tutorial useful!

You May Find the Following Google Sheets Tutorials:

Popular Posts

1 thought on “How to Sort in Google Sheets – Easy Guide for 2024”

Comments are closed.

Access All

Free Templates

Enjoy our custom-made Google Sheets templates for free via email access