How to Sort in Google Sheets

Google Sheets Logo on Green Background

When reviewing or analyzing a spreadsheet, one thing that you might need to do is sort your data. Fortunately, you can easily sort an entire sheet or a range of cells alphabetically, numerically, or by color in Google Sheets.

Table of Contents

Sort an Entire Sheet by a Column

One of the most common ways to sort a spreadsheet is by using a specific column. For example, you might want to sort a column by the lowest value, but also make sure that all data in the sheet remains intact.

Freeze the Column Headers

If you have column headers in your Google Sheet, you’ll want to freeze that row before applying the sort. Otherwise, the data in the headers will be included.

Start by selecting the row containing the column headers. Then, click View > Freeze > 1 Row in the expanding menu.

Click View, Freeze, 1 Row

This will keep the column headers in place and out of the sorted data.

Sort the Data

Next, select the column and then use one of these three actions to sort the sheet by the selected column.

  • Click “Data” in the menu and choose “Sort Sheet By Column X, A to Z” or “Sort Sheet By Column X, Z to A.”
  • Right-click the column and choose “Sort Sheet A to Z” or “Sort Sheet Z to A.”
  • Click the arrow next to the column header and choose “Sort Sheet A to Z” or “Sort Sheet Z to A.”

Click Data, Sort Sheet By Column


If you’re sorting numerical data, using A to Z will place the lowest value at the top. And of course, using Z to A will place the highest value at the top.

You’ll see your sheet update immediately to sort the entire sheet by the column that you selected.

Sheet Sorted by Column F in Google Sheets

Sort Only a Range of Cells

Maybe you have a spreadsheet with a range of cells that’s unrelated to the rest of the data. In this case, you can sort only that range without affecting the remaining data.

Use a Quick Sort

You can quickly sort the range of cells from A to Z or Z to A. Select the cell range, click “Data” in the menu, and pick “Sort Range By Column X, A to Z” or “Sort Range By Column X, Z to A.”

Click Data, Sort Range By Column

Use a Custom Sort

If the range of cells that you’re sorting contains a header, or you want to sort by multiple columns, this option is the way to go.

Select the range of cells and then either click Data > Sort Range or right-click and pick “Sort Range” in the shortcut menu.

Click Data, Sort Range


A window will pop open for you to choose the sorting options. Check the box at the top if the “Data Has a Header Row.” This will keep the header from being sorted with the other data.

Check the box if your Data Has a Header Row

Choose to sort by A to Z or Z to A and click “Sort.” You’ll see only the range of cells that you selected in your sheet adjust per the sort order.

Click Sort for the Data Range

If you want to add another range of cells or a column, click “Add Another Sort Column” and choose the order for that as well. Then, click “Sort.”

Add Another Column to the Sort

Sort by Color in Google Sheets

Using color in your spreadsheet is handy for spotting certain data quickly. Whether you use color for the text or to fill the cell, you can use this sort order as well. The main difference is that you must create a filter to sort by color.

Select the entire sheet or just the range of cells that you want to sort by color. Click Data > Create a Filter from the menu.

Click Data, Create a Filter

Click the filter icon at the top of the column that you want to use for the sort. Do this for sorting the entire sheet or for just the range of cells.


Move your cursor to “Sort by Color” in the small window. Then, move to “Fill Color” or “Text Color” depending on which you prefer. You’ll see another pop-out displaying the colors that you’re using. Choose the color that you want highest in the sort order.

Choose a Color to Sort by

Note: If Fill Color or Text Color is grayed out, you are not using that color in the selected cells.

Like with the other sort options, your sheet or cell range will immediately update to sort by the color that you picked.

You can then disable the filter by clicking Data > Turn Off Filter.

Click Data, Turn Off Filter

Be sure to check out the handy sorting option in Google Sheets the next time you’re reviewing your data. And if you use Microsoft Excel in addition to Google Sheets, you can sort by values or sort by date in Microsoft Excel just as easily.