Multi-Level Sort in Google Sheets: A Practical Guide

How-to basics · Updated November 3, 2026

Multi-Level Sort in Google Sheets: A Practical Guide

To sort Google Sheets by more than one column, select the full data range, then choose Data > Sort range > Advanced range sorting options. If your range has column headings, check Data has header row, choose the first sort column and order, then select Add another sort column for each additional level.

What a multi-level sort does

A multi-level sort applies ordered rules to a group of rows. The first column is the primary rule; the next column is used only to order rows that tie on the first one. Further columns break ties left by the earlier rules. The rows remain intact, so values in the same record move together.

For example, sorting a sales table first by Region, then by Salesperson, and then by Sale Date groups regions together, sorts names within each region, and orders each salesperson’s sales by date. It does not sort every column independently. Sorting columns separately can disconnect names from their sales or other record details, so select the whole table rather than one column.

The rules are applied in the order shown in the sort dialog. Think of the first rule as the broad grouping and later rules as increasingly specific organization within those groups. If every row has a different value in the first column, later rules will have no visible effect because there are no ties for them to resolve.

How to sort by multiple columns

  1. Make sure the data is arranged as a table: one header row followed by records, with each type of information in its own column.
  2. Select the complete range, including all columns that belong to the records. Include the header row if you plan to identify headers in the sort dialog.
  3. Open Data > Sort range > Advanced range sorting options.
  4. If the top row contains labels such as Region or Date, check Data has header row. This lets you choose headings by name rather than sorting by a column letter.
  5. In Sort by, choose the primary column and select an order, such as A to Z or Z to A. For numerical or date values, the available order is ascending or descending.
  6. Select Add another sort column. Choose the next heading and its order. Repeat for any further levels, then select Sort.

Before sorting, check that the selection includes every column that should travel with each record. A spreadsheet can contain notes or separate summaries nearby; those should not be included accidentally. Likewise, leaving a record column outside the selected range can cause the sorted rows to no longer match the values in that column.

A worked example: region, salesperson, and date

Imagine a table with the headings Region, Salesperson, Sale Date, and Amount. To create a report that groups sales by region, sorts each region’s names alphabetically, and shows each person’s transactions in chronological order, set the sort levels as follows:

  • Sort by Region: A to Z.
  • Then by Salesperson: A to Z.
  • Then by Sale Date: A to Z, which puts earlier dates before later dates.

The Amount column does not need its own sort level: it stays attached to its original row while the records move. If the report should show the largest transaction first for each salesperson, make Sale Date the third level and choose descending order instead. If you want to sort primarily by amount, move Amount to the first level; changing the order of levels changes the result.

A useful check is to look at a group with repeated values in the first column. Within one region, the salesperson names should follow the selected name order; within each person’s records, dates should follow the selected date order. This makes it easier to spot a wrong heading, an omitted level, or an unexpected direction.

Choose the right range and header setting

Sort range is usually the best choice when you want to organize a particular table without changing unrelated content elsewhere on the sheet. In the advanced options, the header-row setting matters: with it enabled, the first row is treated as labels and is excluded from the data sort. If a data row is mistakenly treated as the header, it will stay at the top and the remaining records will sort below it.

When sorting an entire sheet, use the sheet-sorting options under Data rather than sorting just a selected column. A whole-sheet sort is useful when the sheet is one continuous dataset and every row should move together. It is less suitable when the sheet contains several separate tables, explanatory notes, or totals that should remain in place. In those cases, sort only the intended range.

Keep the table continuous where possible. Completely blank rows can make it less clear which records belong to a range, while merged cells can interfere with sorting. A reliable layout uses one header row, one record per row, no merged cells in the data area, and no unrelated content inside the selected range.

Sorting with filters and filter views

A filter is useful when you want to sort a table while also showing only certain records. Choose Data > Create a filter to add filter controls to the header row. Open a column’s filter menu to sort by that column or to filter which values are shown. For a carefully specified multi-column sort, the advanced range-sorting dialog gives you explicit control over the sort priority.

Filter views are useful when different people need different ways to inspect the same shared data. Choose Data > Create a filter view to make a view, then use the column controls to filter or sort the displayed data. A filter view is not a separate copy of the spreadsheet; it is a saved way to view the data. Use it when you want a particular view without changing the ordinary filter settings for everyone working in the sheet.

Sorting changes the order of rows in the range; filtering hides rows that do not meet the selected conditions. These are different actions. If a row appears to be missing after using a filter, check the filter criteria before assuming the row was deleted. Clear the filter or show all values to see the full set again.

How Google Sheets handles values and sort order

Text is sorted alphabetically, while numbers and recognized dates are sorted by their values rather than simply by the characters displayed on screen. A date that is stored as plain text may not behave like a genuine date, and numbers stored as text can sort in an unexpected sequence. For instance, text values “1,” “10,” and “2” can sort alphabetically rather than numerically.

If the result looks wrong, check the underlying cell contents and formats. A date may look like a date but be stored as text because it was imported or entered with an unrecognized format. Similarly, a leading apostrophe or inconsistent spaces can make entries that look alike behave differently. Correcting the data before sorting often produces a more dependable result.

Sort direction is set separately for each level. You can sort Region A to Z, then Amount largest to smallest within each region, for example. Mixed directions are often useful: a report might group names alphabetically while putting the newest date first within each name. The order of levels and the direction of each level together define the result.

Common sorting problems and how to fix them

  • Rows no longer match: The selected range may have included only some columns. Undo immediately if possible, then repeat the sort with the full table selected. Avoid sorting one column by itself when its values belong to records in other columns.
  • The heading moved into the data: Reopen the advanced range options and set the header-row checkbox correctly. Confirm that the selected range starts on the actual header row.
  • The sort seems to ignore a column: Later levels only order ties left by earlier levels. Check that multiple records share the earlier sort value, and confirm the later heading and direction are correct.
  • Numbers or dates appear out of order: Look for numbers or dates stored as text, extra spaces, inconsistent formats, or mixed types in the same column. Standardize the column and sort again.
  • Some records were not included: Expand the selected range to include all data rows. Check whether a blank row or separate block caused you to select only part of the table.
  • The sheet will not sort as expected: Merged cells, protected ranges, or edit permissions can limit what you can change. Unmerge cells in the data range if appropriate, and confirm that you have permission to edit it.

For a safe redo, use Edit > Undo immediately after an unwanted sort, or use the Undo button. If other edits have been made since the sort, undoing may also reverse those later changes, so inspect the result before continuing. For important data, keeping a copy or version history provides another way to recover the original arrangement.

Multi-level sorting versus other ways to organize data

A manual multi-level sort is best when you want to rearrange a table into a particular order. A filter is better when the goal is to temporarily hide records, such as showing only one region. Filter views can preserve different saved views for different tasks. These tools solve related but distinct problems: sorting changes row order, filtering changes which rows are visible, and a filter view packages filter and sort choices as a view.

For recurring reports, consider keeping the source data in its original order and using a separate report area or sheet for an arranged view. Google Sheets also has a SORT function that can return a sorted copy of a range, which may be useful when the source should remain untouched. Its syntax and behavior differ from Excel’s SORT function, so use Google Sheets’ function help for the exact arguments if you choose that approach. A formula-based result is not the same as manually reordering the source records.

Choose based on whether you need a one-time rearrangement, an interactive view, or a separate output that updates from source data. For a quick one-off task, the advanced range sort is straightforward. For shared data, filter views can reduce conflicts over how colleagues are viewing the same table. For repeatable reporting, a separate output may be easier to audit and refresh.

Frequently Asked Questions

Can Google Sheets sort by more than two columns?
Yes. In Data > Sort range > Advanced range sorting options, choose Add another sort column for each additional level you need. More levels are useful when earlier columns contain repeated values.

Does Google Sheets keep each row together when sorting?
Yes, provided the selected range includes the full set of columns that make up each record. Selecting only one column can separate its values from the related information in other columns, so select the complete table or use the appropriate whole-sheet sort.

Should I include the header row in the selected range?
You can include it, but mark Data has header row in the advanced options. This tells Sheets to keep the heading at the top and lets you choose sort columns by their labels. If the range starts below the headings, do not identify its first data row as a header.

Can I sort one column ascending and another descending?
Yes. Set the direction for each sort level independently. For example, sort Department A to Z and then Revenue Z to A to group departments alphabetically while ranking revenue from highest to lowest within each department.

Why does a date or number sort incorrectly?
The values may be stored as text, or the column may contain a mixture of text and real dates or numbers. Check the cell contents, spaces, and formats, standardize the values, and run the sort again.

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.