Don’t forget to share this post

In Google Sheets, you can sort your data however you want. In addition to sorting alphabetically or numerically, it's also possible to sort by date and by color. You can sort according to one or multiple columns in the order you prefer, and you can do this using different methods. It’s important to note the difference between the two methods used in this article. The first method involves using the menu options, which will alter the original data. In other words, it’s applied directly to your selected range. Using the SORT function, on the other hand, does not alter the original data. Instead, it displays the sorted version of that data in new cells. Finally, the filter options allow for different data types, like dates and colors, but will also change the original data.

In this post, you will learn how to sort data in Google Sheets using the menu and using the SORT function. You have step-by-step instructions on how to sort using the menu and how to sort using the function. Finally, you have examples of how to use the filter options to sort by date, by color, and using custom values.

Layer Google Sheets Add On
Get Started With Layer Today!

Share parts of your Google Sheets, monitor, review and approve changes, and sync data from different sources – all within seconds.

GET STARTED FOR FREE

How to Sort in Google Sheets with the Sort Menu?

First, let’s see how to sort data by a single column from the menu.

  1. 1. Select the table with the data you want to sort.
How to Sort in Google Sheets Examples Select Column Data
How to Sort in Google Sheets (+ Examples) - Select Column Data
  1. 2. Go to Data > Sort range > Advanced range sorting options.
How to Sort in Google Sheets Examples Advanced Range Sorting Options
How to Sort in Google Sheets (+ Examples) - Advanced Range Sorting Options
  1. 3. If you have selected the entire table, check the “Data has headers row” checkbox.
How to Sort in Google Sheets Examples Data Headers
How to Sort in Google Sheets (+ Examples) - Data Headers
  1. 4. That’s it. The table is sorted by the values in the first column in ascending order.
How to Sort in Google Sheets Examples Sorted Data
How to Sort in Google Sheets (+ Examples) - Sorted Data
How to Create and Use Google Sheets Filter View
How to Create and Use Google Sheets Filter View

With Google filter view, you can filter data in a shared Google Sheets file without it affecting other users. Here’s how to use Google Sheets filter view.

READ MORE

How to Sort by Multiple Columns in Google Sheets?

To sort by multiple columns, select the range of cells and go to Data > Sort range > Advanced range sorting options. For this example, I will sort by the sales team, then by the sales agent.

  1. 1. Select the “sales_team” column and ascending order. Click “Add another sort column”.
How to Sort in Google Sheets Examples First Sort Column
How to Sort in Google Sheets (+ Examples) - First Sort Column
  1. 2. Select the “sales_agent” column and ascending order. Once you’ve added all the columns you want, click “Sort”.
How to Sort in Google Sheets Examples Second Sort Column
How to Sort in Google Sheets (+ Examples) - Second Sort Column
  1. 3. That’s it. The data is sorted by the team, then by the agent.
How to Sort in Google Sheets Examples Sorted Data 2
How to Sort in Google Sheets (+ Examples) - Sorted Data

How to Sort in Google Sheets with the Sort Function?

Using the SORT function, you can also sort the rows in a range of cells according to the values in one or more columns.

SORT Function Syntax

=SORT(range, sort_column, is_ascending, [sort_column2], [is_ascending2])
  • range: the range of data you want to sort.
  • sort_column: the index number of the column containing the values by which you want to sort.
  • is_ascending: ‘TRUE’ for ascending order and ‘FALSE’ for descending order.
  • sort_column2*: optional. You can add more columns by which to sort in order of precedence.
  • is_ascending2*: optional. If a second sort column has been selected, specify the sort order.

SORT Function Using a Single Column

In this example, I will sort the data in my table by sales ID using the SORT function.

  1. 1. In an empty cell, type the SORT formula.
How to Sort in Google Sheets Examples SORT Function
How to Sort in Google Sheets (+ Examples) - SORT Function
  1. 2. For the range argument, select all the data in the range.
How to Sort in Google Sheets Examples Select Range
How to Sort in Google Sheets (+ Examples) - Select Range
  1. 3. Select the column containing the values by which you want to sort.
How to Sort in Google Sheets Examples Select Sort Column
How to Sort in Google Sheets (+ Examples) - Select Sort Column
  1. 4. For the third argument, type ‘TRUE’ for ascending order. Press Enter. If you want to sort by more than one column, specify the necessary arguments: “sort_column2”, “is ascending2”, etc.
How to Sort in Google Sheets Examples Select Sort Order
How to Sort in Google Sheets (+ Examples) - Select Sort Order
  1. 5. That’s it. The data is sorted by the values in the first column.
How to Sort in Google Sheets Examples Sorted Data 3
How to Sort in Google Sheets (+ Examples) - Sorted Data

How to Sort Data Using Filter Options?

Now that you know how to sort using both the menu and the function let’s see some examples of how to use the function with different data types. For these examples, I have modified the dataset to include a date column.

First, click one of the column headers and go to Data > Create a filter.

How to Sort in Google Sheets Examples Enable Filter
How to Sort in Google Sheets (+ Examples) - Enable Filter

You will see the inverted pyramid symbol to the right of each column header.

How to Create and Use a Pivot Table in Google Sheets
How to Create and Use a Pivot Table in Google Sheets?

Pivot tables can help you summarize large data sets in spreadsheets. Here's how to create a pivot table in Google Sheets.

READ MORE

Sort by Date in Google Sheets

For this example, I will sort the data according to the dates in the first column.

  1. 1. Click the filter symbol in the column with the dates and select the order you prefer.
How to Sort in Google Sheets Examples Select Sort Order 2
How to Sort in Google Sheets (+ Examples) - Select Sort Order
  1. 2. That’s it. The data is sorted by date.
How to Sort in Google Sheets Examples Sorted by Date
How to Sort in Google Sheets (+ Examples) - Sorted by Date

Sort by Color in Google Sheets

For this example, I have assigned different colors to each sales team. Now, I can use the filter options to sort by color.

  1. 1. Click the filter options in the sales team column. Under “Sort by color”, choose “Fill color”, then select the color you want at the top of the column.
How to Sort in Google Sheets Examples Sort by Fill Color
How to Sort in Google Sheets (+ Examples) - Sort by Fill Color
  1. 2. That’s it. The data is sorted by your chosen color.
How to Sort in Google Sheets Examples Sorted Data 4
How to Sort in Google Sheets (+ Examples) - Sorted Data

How to Automate Your Data on Top of Google Sheets?

Layer is an add-on that equips you with the tools to increase efficiency and data quality in your processes on top of Google Sheets. Share parts of your Google Sheets, monitor, review and approve changes, and sync data from different sources – all within seconds. See how it works.

Using Layer, you can:

  • Share & Collaborate: Automate your data collection and validation through user controls.
  • Automate & Schedule: Schedule recurring data collection and distribution tasks.
  • Integrate & Sync: Connect to your tech stack and sync all your data in one place.
  • Visualize & Report: Generate and share reports with real-time data and actionable decisions.

Limited Time Offer: Install the Layer Google Sheets Add-On today and Get Free Access to all the paid features, so you can start managing, automating, and scaling your processes on top of Google Sheets!

Conclusion

There are many ways to sort your data in Google Sheets. In addition to the menu options, you can also use the SORT function. Regardless of the type of values you are working with, you can sort them in ascending or descending order. In other words, you can sort alphabetically, numerically, by date, or even by color or custom values. You now know how to sort data in Google Sheets according to one or more columns using the menu options. You also know how to sort one or more columns using the SORT function. Additionally, you have examples of how to use the filter options to sort your data by date, color, and custom values.

Layer Google Sheets Add On
Get Started With Layer Today!

Share parts of your Google Sheets, monitor, review and approve changes, and sync data from different sources – all within seconds.

GET STARTED FOR FREE
Hady ElHady
Hady is Content Lead at Layer.

Hady has a passion for tech, marketing, and spreadsheets. Besides his Computer Science degree, he has vast experience in developing, launching, and scaling content marketing processes at SaaS startups.

Originally published Jan 12 2023, Updated Jan 15 2023