How to Sort Google Sheets: Rows, Columns, and Filters

How-to basics · Updated November 20, 2026

To sort what people sometimes call Google Excel, open the spreadsheet in Google Sheets, select the full data range, then choose Data > Sort range > Advanced range sorting options. Mark the header-row option if your selection includes column labels, choose the column and sort order, and click Sort. Sorting the full range keeps each row’s information together; sorting only one column can scramble your data.

Google Sheets is Google’s spreadsheet app, rather than a version of Microsoft Excel. The instructions below are for Sheets in a web browser. Excel has similar sorting ideas, but its menu labels and steps differ. Before changing a sheet, consider making a copy if the order is important or difficult to recreate.

What You’ll Need

  • A Google account with permission to edit the spreadsheet. If you only have view access, you will not be able to change the sort order.
  • A spreadsheet open in Google Sheets in a web browser, with the data you want to sort arranged in rows and columns.
  • A clear idea of which column should determine the order, such as name, date, quantity, or status.

Step-by-Step

  1. Check how the data is arranged. Each record should occupy one row, with related details spread across columns. For example, a task list might have Task in column A, Owner in column B, and Due date in column C. Look for blank rows or columns inside the list, merged cells, and notes that belong to a record but sit outside the table. Resolve those before sorting, or the selected range may not include every related value.
  2. Decide whether to sort one range or the whole sheet. If the sheet contains only one table, sorting the sheet is often convenient. If it contains multiple tables, notes, or summaries, sort just the relevant table. For a range sort, select all the rows and columns that belong together, including every record and field. Do not select only the column you want to order by: that can leave names beside the wrong dates or amounts.
  3. Select the data range. Click and drag across the table, including its column labels if it has them. For a large, continuous table, you can click a cell inside it and use Ctrl+A on Windows; on a Mac, use Command+A. Check the highlighted selection before continuing, especially if there are other data areas on the sheet. If the shortcut selects more than the table you intend to sort, select the exact range by dragging instead.
  4. Open the range-sorting controls. With the range selected, choose Data > Sort range > Advanced range sorting options. In the dialog, turn on Data has header row if the first row contains labels such as Name or Due date. This tells Sheets to keep those labels at the top rather than treating them like a record. If you leave the option off when there is a header, the header may be sorted into the data.
  5. Choose the column that controls the order. In Sort by, choose the header or column letter for the field you want to arrange. For a name list, choose Name; for a schedule, choose Due date. If the labels are not recognized, confirm that you selected the header row and enabled Data has header row. Otherwise, choose the correct column letter and make sure it refers to the intended field.
  6. Choose ascending or descending order. A to Z puts text in ascending alphabetical order; Z to A reverses it. For numbers, ascending generally puts smaller values first, while descending puts larger values first. Dates sort from earlier to later in ascending order and later to earlier in descending order. Click Sort to apply the change, then scan the first few and last few rows to confirm that the result makes sense.
  7. Sort by more than one column when needed. In the advanced sort dialog, choose Add another sort column to add a secondary rule. For example, sort a roster by Department from A to Z, then by Last name from A to Z. The second rule organizes rows that have the same Department, without changing the primary department order. Add further rules only when they solve a real tie; an extra sort rule can make the result harder to interpret.
  8. Use a sheet sort for a single-table sheet. If all relevant data belongs to one table, click a cell in the column you want to sort and choose Data > Sort sheet > Sort sheet by column [letter] (A to Z) or (Z to A). Replace [letter] with the actual column shown in the menu. This sorts the sheet’s rows according to that column. Avoid this option when unrelated information shares the sheet, and verify that the header remains in place afterward.
  9. Turn on a filter for repeat sorting. Select the table, including its header row, then choose Data > Create a filter. Filter buttons appear in the header cells. Click the button for the column you want and choose a sort option, such as Sort A to Z or Sort Z to A. A filter is useful when you will sort or narrow the same table repeatedly. Choose Data > Remove filter when you no longer need the filter controls.
  10. Check the result before sharing or continuing. Confirm that every row is still intact, the header is in the right place, and values are ordered as expected. If the order is wrong immediately after the sort, use Edit > Undo or Ctrl+Z on Windows; on a Mac, use Command+Z. Undo may not be available after other edits or after closing the file, so a copy is a safer fallback for important sheets.

Common Mistakes

Sorting only the key column. This is the most damaging error because it separates a value from the rest of its record. Select the entire table or use a sheet sort for a sheet containing just that table. Before clicking Sort, inspect the highlighted area and make sure it covers every related column.

Forgetting to identify the header. If a label such as Name is included but Data has header row is not enabled, the label may move into the list. In the advanced sort dialog, enable the header option when the top row contains labels. If the first row is a real record rather than a label, leave it unchecked.

Including unrelated cells or missing part of the table. A summary beside the table could be pulled into a sort, while a column outside the selection could stay behind. Select only the intended table, but include every column and record that belongs to it. Blank rows within a table can also make it less obvious where the data range ends.

Expecting text that looks numeric to sort like a number. Values entered or imported as text may sort alphabetically, so 100 can appear before 20. Dates stored as text can also sort in an unexpected order. Check the cell format and how the values were entered; convert or clean inconsistent values before sorting, and verify the result rather than assuming appearance tells you the underlying type.

Tips

Make column labels clear and keep them in one header row. A label such as Order date is easier to choose in the sort dialog than an empty header. Avoid merged cells in the data area: they can complicate selecting and sorting records. Keep titles and explanatory notes above or beside the table, not as extra rows mixed into its records.

For a one-time task, an advanced range sort gives you direct control over the range, header, and sort rules. For recurring work, a filter keeps sort controls available in the headers. A filter can also let you display only records meeting a condition, but sorting and filtering are different: sorting changes row order, while filtering hides rows that do not match the chosen criteria.

Use a second sort column for a meaningful tie-breaker, such as team first and employee name second. Add the tie-breaker in the order you want it applied. If the primary field has no duplicate values, a secondary rule will not visibly change the result. For dates, use consistent date values rather than a mixture of dates and typed descriptions like next Friday.

When a spreadsheet is shared, remember that a sort changes the order in the shared sheet, not just your personal view. If other people are editing at the same time, coordinate before reorganizing a shared table. For an important workflow, make a copy first or tell collaborators that the rows will move, so they do not mistake the new order for changed records.

Troubleshooting

The header moved into the records. Undo the sort right away if possible. Re-select the full range, open Data > Sort range > Advanced range sorting options, and enable Data has header row. Choose the correct column and sort again. If the header was not included in the selection, select it along with the data before retrying.

Values are sorted in an unexpected order. First check whether the selected column contains mixed types, extra spaces, inconsistent date formats, or numbers stored as text. Also check that the sort direction is right and that the intended column is selected. Correct the inconsistent entries, then sort the complete range again. A value that merely looks like a date or number may not be stored as one.

Some details no longer match their original records. Undo immediately if the sort was just performed. Then select all columns that make up the table and repeat the sort. If the change can no longer be undone, use a prior version from File > Version history > See version history, if you have access to one, or restore the data from a saved copy. Be careful when restoring a prior version because it can also roll back other people’s edits.

The sort controls are unavailable or the sheet will not change. Check whether you have edit permission and whether the sheet or range is protected. A protected area may require its owner to change permissions. If a filter is active, check its controls and remove it if needed using Data > Remove filter. If the page is unresponsive, wait for edits to finish saving, then reload the browser tab and check the sort again.

Frequently Asked Questions

Is Google Excel the same as Google Sheets?
Google Sheets is Google’s spreadsheet application. People sometimes call it Google Excel informally, but Excel is Microsoft’s separate spreadsheet program. These steps and menu paths apply to Google Sheets in a web browser.

How do I sort a column without mixing up the rows?
Sort the entire data range, not just that column. Select all fields belonging to each record, then choose the sort column in the advanced range options. This moves each row together as a unit.

Can I sort by two columns in Google Sheets?
Yes. Choose Data > Sort range > Advanced range sorting options, set the first column, and select Add another sort column for the next rule. The second column is used to order records tied under the first rule.

How do I sort dates from newest to oldest?
Select the full table, identify its header if it has one, and choose the date column as the sort key. Choose Z to A for descending order. If the order looks wrong, check whether the dates are stored as dates or as text.

Can I sort a filtered list?
Yes. With a filter created using Data > Create a filter, click the header’s filter button and choose a sort order. Sorting changes the order of the rows in the range; filter conditions can separately hide rows from view.

Does sorting affect other people using the spreadsheet?
Yes, a normal sort changes the shared sheet’s row order, so collaborators can see the change. Coordinate with editors before sorting a shared table, especially if people are actively working in it.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.