How to Alphabetize in Google Sheets: Your Guide to Sorting

Written by Coursera Staff • Updated on

Learn how to sort data alphabetically, numerically, or chronologically in Google Sheets.

[Featured Image] A laptop keyboard sits on a yellow background with a smartphone and folded pair of glasses beside it.

There are many reasons you may want to sort your Google Sheet in alphabetical, numerical, or even chronological order, including to more easily find employee names, organize a financial budget, or group purchase orders based on their shipment dates. You can sort a sheet by all of these factors using the Sort functionality.

In this tutorial, you’ll learn how to sort a Google Sheet in alphabetical, numerical, and chronological order, including by date and time.

Afterward, you’ll also learn how to perform related tasks like how to sort a whole sheet and how to filter your data by color, condition, or value. At the end, you’ll explore some common problems you may encounter when sorting a Google Sheet, along with ways to resolve them. 

How to sort in Google Sheets: Sorting one or more columns by alphabetical, numerical, or chronological order

The process to sort a Google Sheets column in alphabetical, numerical, or chronological order by date and time is the same for each data type. Sheets is capable of automatically interpreting each value and organizing your data in either ascending (lowest-to-highest) or descending (highest-to-lowest) order. Once you know how to sort a column alphabetically, you will also know how to sort it in numerical and chronological order, and vice-versa.

Here’s what you’ll do:

  1. Highlight the range you would like to sort.

  2. Freeze the header row, if your sheet has one. 

  3. Go to Data in the top menu. Then, go to Sort Range > Advanced Range.

  4. Select Data has a header row if your columns have titles. 

  5. Select a column to sort and the sorting rule. If you would like to add another sorting column, select Add another sort column. 

  6. Click sort.

Let's take a closer look at each step.

Ready to deepen your knowledge of Google Sheets?

To begin, you'll need your tab open to your spreadsheet. If you’re not already working with your own data set and want to follow along, you can make a copy of this template to practice. 

Placeholder

1. Highlight the range you would like to sort.

The first step to sorting a column (or columns) is to select and highlight the range of data you will be organizing. A data range can consist of a single cell or multiple adjacent cells, but typically, when sorting, you'll want to highlight the full range of data contained within your sheet because you’ll want the rows intersecting with the sorted column(s) to also be sorted. 

In the image below, for example, the range selected is from cell A1 (in the upper left corner of the sheet) to cell F47 (in the lower right). The exact range you’ll select will depend on the data you are sorting. To highlight a range, click on the upper left cell of the data you are organizing, hold the shift key, and then click the lower right cell of the data you are organizing. Alternatively, you can also click on the upper left cell of data you are organizing, hold down on the mouse, and drag your cursor to the lower right cell. Your data range is now highlighted.

Alt text: A highlighted data range in Google sheets

2. Freeze the header row, if your sheet has one.

Once you’ve highlighted your data range, you’ll want to freeze the header row by clicking View > Freeze > 1 Row. “Freezing” a row means that it will be pinned in the Google Sheet, so that it will remain in the same place as you scroll down the page, keeping column’s header row available to reference. 

If you don’t have a header row, then you don’t need to freeze any rows and can move to the next step. 

Alt text: Freezing a Google Sheet’s row

3. Select 'Sort Range' under the 'Data' menu.

Now, you're ready to sort your data. Go to the Data menu. Select Sort Range > Advanced Range. If you don’t have a header row and only want to sort one column, you can click Sort Column (A-Z) or (Z-A), which will sort your data range in either ascending or descending order (including the header row), but only for the column containing the first cell of your highlighted data range.

Most users will want to click Advanced Range, however, because it will allow you to sort your entire data range by any column within it, give you the ability to lock the header row so it doesn’t become sorted with the rest of your data, and give you the option to sort multiple columns. 

In the event that Sort Column meets your needs, then once you click it your data will become sorted in alphabetical, numerical, or chronological order in either ascending or descending order, depending on the data located in the first highlighted column of your data range and the rule you applied. 

Alt text: Identifying the sort range function in Google Sheets

4. Select 'Data has a header row' if your columns have titles. 

If you clicked Advanced Range in the previous step, then a pop-up window will appear that presents you with the sorting options for Google Sheets. In the window, click the box that says Data has header row, if your sheet has one. Once the box is clicked, the drop-down menu in the Sort by section will now describe each column by its header name rather than its letter.

The check box for Data has header row will lock the header row of your data range, so that it doesn’t become sorted with the rest of the data contained within each column. If the header row of the sheet in the image below were not locked, for instance, then the header for column C (“Directors”) would become sorted in alphabetical order with the rest of the data in the column in the event that a sorting rule was applied to it. 

Alt text: Applying a sorting rule to a data range in Google sheets

5. Select a column to sort and the sorting rule. If you would like to add another sort column, click 'Add another sort column.' 

Next, select the column you would like to sort and the sorting rule you would like to apply to it. You can select the column by clicking on it in the drop-down menu contained within the Sort by section. Afterward, select the sorting rule you would like to apply to it by clicking either the button for A → Z or Z → A, which will sort the column in either ascending order from lowest to highest value (A → Z) or in descending order from highest to lowest value (Z → A). 

You can add another sorting column and rule by clicking Add another sort column at the bottom of the window, which will create an additional section where you can select another column and sorting rule for it. You can add as many columns and sorting rules as you need, but keep in mind that Google Sheets implements sorting columns and rules in sequential order from top to bottom.

In the image below, for example, the Google Sheet will first sort the data range by the column containing “Box office earnings” in ascending numerical order and then sort that ordering of the data range by the ascending alphabetical order of the “Director (1)” column. 

Alt text: Applying multiple sorting rules to a data range in Google sheets

What do A-Z and Z-A mean? 

A-Z organizes data in ascending order from lowest to highest, meaning it will organize your data from top to bottom in either alphabetical order from A to Z or in numerical order from the lowest to highest number. Z-A organizes data in descending order from highest to lowest value, meaning it will order your data from top to bottom in reverse alphabetical order from Z to A or in descending numerical order from the highest to the lowest number.

For dates and times, A-Z will organize your data from the oldest time down to the most recent, while Z-A will organize your data from the most recent time to the oldest. 

Placeholder

6. Click 'Sort.' 

Once you’ve selected the column you would like to sort and its sorting rule, click Sort. The data range will now be sorted in alphabetical, numerical, or chronological order, depending on the data type contained within the column. In the image below, for instance, the column “Box office earnings” is now ordered in ascending numerical order. 

Alt text: A sorted Google Sheet data range

Below, you’ll learn how to sort an entire spreadsheet or filter your data range by other factors, such as color, condition, or value. 

Sort a whole sheet

To sort an entire spreadsheet in Google Sheets, perform the following steps: 

  1. Right-click the letter at the top of a column in your spreadsheet or click the downward-facing arrow beside the letter at the top of the column. 

  2. In the pop-up window, click either Sort Sheet A to Z or Sort Sheet Z to A

Note: this method will not lock your header row, so it will become sorted with the rest of the data.

Filter your data by color, condition, or value

You can also filter your data by color, condition, or value in Google Sheets. Here’s what you’ll need to do: 

1. Highlight the data range you will be sorting. 

2. Click Data > Create a filter. A downward-facing arrow will now appear at the top of each column of your data range. This symbol indicates that filters are available for the data range. 

3. Click the downward-facing arrow located in the top right of each column in your data range. Select either the color, condition, or value filter. To filter the data, select one of the following filters:

  • Sort by color: The column is sorted by either fill color or text color.

  • Filter by color: The column is filtered by either fill color or text color.

  • Filter by condition: The column is filtered by a specific condition, such as whether it is empty, contains text, or includes a value greater than a specified number. 

  • Filter by value: The column is filtered for a specified value, such as a number range or category. 

4. Remove filters by clicking Data > Remove Filter

Troubleshooting and common errors

A common error that occurs when sorting data is that the data contained within the sorted column becomes mismatched from the rows they were previously aligned with. This typically occurs when the cells selected for sorting weren’t the full data range, but instead only the column that was intended to be sorted. 

To solve this problem, restore the data to its original order by pressing Ctrl+Z, which will undo the previous sorting action. Next, select the entire data range you will be sorting, including all the rows intersecting with the column to be sorted and all adjacent columns contained within the range. Finally, perform the sorting function as you did previously. Your data should now be sorted.

Learn more with Google

Interested in strengthening your abilities to work with data using Google Sheets? Enroll in the Google Data Analytics Professional Certificate. You’ll learn more about spreadsheets and other key analysis tools.

 

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.