Illustration: Andy Wolber/TechRepublic

Google Sheets often helps people manage lists of people, things and places. An alphabetical sort can not only bring a bit of order to these lists, but also help us recognize patterns, such as inaccurate or duplicated data. Google Sheets on the web offers at least two distinct alphabetical sort options.

The first reorganizes your data alphabetically with a single-column sort, while the second lets you sort first by one column, then another, then another and so on. The latter option helps you organize items when data may be the same in multiple cells, such as when sorting by a country, a state and then a city. The Google Sheets mobile apps also offer single-column sort capabilities.

Follow the instructions below to sort your sheet A-Z or Z-A on the web, Android or iOS.

SEE: Cloud Data Storage Policy (TechRepublic Premium)

How to alphabetize a column

You can sort cells in a Google Sheet in either alphabetical or reverse-alphabetical order. The process works similarly in Google Sheets in a web browser as it does in the Google Sheets mobile apps.

1. Freeze header rows.

Browser: If your Sheet has a header row, you’ll need to freeze the header row(s)–otherwise, the system will sort your header data along with everything else (Figure A). Choose View | Freeze, then select the number of rows you need to freeze. For a single line header, which is common, you would select View | Freeze | 1 row.

Figure A

If your sheet has header rows, make sure to Freeze the header rows (View | Freeze | select as appropriate) before a sort.

Mobile app: Along the left side of your sheet, tap the row number (e.g., 1, 2, 3, etc.) twice. The first tap selects the row, the second tap brings up a menu. On Android, tap the three-dot More menu, then tap Freeze (Figure B). On iOS, tap the right triangle More Menu, then tap Freeze Row (Figure B).

Figure B

In the Google Sheets app on Android, tap twice on row or column identifiers (e.g., 1,2,3, etc. or A,B,C, etc.) to bring up the More menu (left image). You may freeze header columns or rows (middle image) and sort columns (right image).

2. Single column sort.

Browser: Select a cell in the column you wish to sort, then select Data followed by the type of sort, either A → Z or Z → A (Figure C). For example, to alphabetize Column C, you would click on any cell in Column C, then choose Data | Sort Sheet By Column C, A → Z. To change the sort type or column, repeat this step.

Figure C

In a Google Sheet on the web, select a cell in a column, then choose Data | Sort Sheet By… options to sort either A-Z or Z-A.

Mobile app: Along the top side of your sheet, tap the column letter (e.g., A, B, C, etc.) slowly twice. The first tap selects the column, the second tap brings up a menu. On Android, tap the three-vertical dot More menu, then tap Sort A-Z or Sort Z-A (Figure D). On iOS, tap the right triangle More menu as many times as needed until the option to tap either Sort A-Z or Sort Z-A is available, then tap your desired sort order (Figure D).

Figure D

In the Google Sheets app on iOS, tap twice on row or column identifiers (e.g., 1,2,3, etc. or A,B,C, etc.) to bring up a menu. Tap the right-pointing triangle to access additional menu options. You may need to tap this triangle more than once to navigate to the desired setting, such as Freeze Row (middle) or, when a column is selected, Sort A-Z or Sort Z-A (right).

How to alphabetize by more than one column

In a web browser, Google Sheets also offers the option to sort by multiple columns. This is useful when you want to sort first by one column, then another, such as when sorting by last name and then first name, for example.

1. First, make sure to freeze any header rows with the View | Freeze command, as described above.
2. Next, select your entire data range. One way to do this is to select the upper-leftmost cell you want to sort and then drag your cursor to the lower-rightmost cell in the sort range (Figure E). For example, in my spreadsheet, I’ll click on the upper-left cell (A2) and drag the cursor to the lower right cell (C16).

Figure E

Click, then drag to select the range you intend to use to sort by multiple columns.

3. Select Data | Sort Range.
4. Choose a column from the displayed drop-down list and select the sort (A → Z or Z → A).
5. Select Add Another Sort Column to add an additional sort level (Figure F). Go to step 4 to specify the sort. Repeat the process for as many sort levels as desired.

Figure F

With a range selected, you may choose to successive columns with the Data | Sort range command. Use the Add Another Sort Column to specify each sub-sort.

6. When finished, select Sort. The data in your selected range will be alphabetized by the columns and sort order specified.

What’s your experience?

Do you use Google Sheets to sort data alphabetically? If so, do you most often use a single-column or multiple-column sort? In what circumstances do you use a reverse alphabetical sort (Z-A)? Let me know how you use the Google Sheets sort options, either with a comment below or on Twitter (@awolber).

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays