To custom-sort Google Sheets data, select the full table, choose Data > Sort range > Advanced range sorting options, select a column and sort direction, then add more sort columns if needed. For a one-off order such as Urgent, High, Normal, Low, add a helper column with a numeric rank and sort by that column; Google Sheets does not provide Excel-style custom-list sorting in its standard sort dialog.
What custom sorting means in Google Sheets
Sorting rearranges rows according to values in one or more columns. A simple alphabetical sort might put customer names from A to Z, while a multi-column sort could group records by department and then order each department by date. In both cases, the values in a row should stay together: a customer’s name, email, and purchase total belong to the same record.
People also use “custom sort” to mean arranging values in a chosen sequence that is not alphabetical or numerical. For example, a project board might need to show “Not started,” “In progress,” and “Complete” in that order. Google Sheets can do this, but the dependable approach is to give each category a sort key, usually in a helper column, and sort by that key.
Sorting changes the order of the data in the selected range or sheet; it does not merely change how values appear. If you want to display an alternate sorted view while preserving the original order, use a formula such as SORT in a separate area instead.
Sort a range using the menu
For a table with headers, use the range-sorting dialog so you can tell Sheets which column contains the first row of labels. First select the whole table, including every column that belongs to each record. Then:
- Choose Data > Sort range > Advanced range sorting options.
- Check Data has header row if the first selected row contains labels such as Name, Team, or Date.
- Choose the column to sort by and select A to Z or Z to A. For numbers and dates, the choices are ascending or descending.
- Select Add another sort column to set a tie-breaker, then choose the next column and direction.
- Click Sort.
For example, a table containing Department, Last name, and Start date can be sorted first by Department A to Z and then by Last name A to Z. Sheets groups matching department values and sorts names within each group. A third sort column can resolve remaining ties, such as sorting employees with the same name by start date.
If you want to sort an entire sheet by one column, use Data > Sort sheet and choose the column and direction. Check that the sheet’s layout is appropriate first: sorting a sheet can affect rows outside the table you had in mind. When a sheet contains separate tables, select and sort the relevant range rather than sorting the entire sheet.
Use a helper column for a chosen category order
A helper column assigns a number to each category, so an ordinary ascending sort produces your chosen sequence. Suppose the table has Task in column A and Priority in column B, with data in rows 2 through 10. Add a Rank heading in C1. With the priority labels in B2:B10 and the desired order Urgent, High, Normal, Low, enter this formula in C2:
=MATCH(B2,{"Urgent","High","Normal","Low"},0)
Fill the formula down through C10. The layout assumed is priority text in B2:B10 and the rank formula in C2:C10. The formula returns 1 for Urgent, 2 for High, 3 for Normal, and 4 for Low; for example, a High task in B2 returns 2. The final 0 asks MATCH for an exact match. If a cell contains a label not listed in the order, MATCH returns an error, so correct the label or add it to the list before sorting.
Now select the full table, including the Rank column, and sort by Rank A to Z using the range-sorting dialog. If two tasks have the same rank, add Priority or another column as a secondary sort only if you need a further ordering rule. You can hide the helper column after sorting, but keeping it visible makes the ranking logic easier for collaborators to understand.
For a small, stable list, you can also enter ranks manually—1 for Urgent, 2 for High, and so on. That can be easier to maintain than a formula when category names vary or require special handling. For more categories, keep the rank list in a separate reference table and use a lookup formula, which is easier to update than editing a long formula in every row.
Sort with a formula instead of moving the source data
The SORT function creates a sorted result in a different location. It is useful when you want the original table to remain in its existing order, or when you need a view that updates as source values change. Leave enough empty cells below and to the right of the formula for the result to expand.
Assume a table occupies A1:C10, with headers in row 1 and data in rows 2 through 10. To show those records ordered by the third column, enter this formula in an empty cell outside the source table:
=SORT(A2:C10,3,TRUE)
The formula returns the rows from A2:C10 in ascending order by the third column; for example, dates in column C appear from earliest to latest. Because the formula range excludes the header, add or copy the header separately above the output if you want one. To sort by the third column and then by the first, use =SORT(A2:C10,3,TRUE,1,TRUE). This sorts on column 3 first, then uses column 1 to order records tied on the first key.
For a custom category sequence, a helper rank is often clearer than trying to make SORT understand a priority list directly. You can include the rank in the sorted range and sort by it, then omit that column from a presentation area if appropriate. Formula results are calculated output, not a new editable copy of the source data: change the source records or sorting formula to change the displayed order.
Keep complete records together
The most important sorting precaution is to include every column that describes the same records. If you select only the names column and sort it, the names may no longer match their original email addresses or totals. Select the entire rectangular table, not just the column you want to use as the key.
Before sorting, check for blank rows or columns that split a table. A blank row can make it easier to select only part of the data by mistake. Confirm the highlighted range in the dialog, and use the header-row checkbox only when the selected range really includes a header. If Sheets treats a label as a data value, or skips a real record as if it were a header, verify the selection and checkbox.
- Make a copy of important data or confirm that version history is available before a large rearrangement.
- Check that dates and numbers are stored as dates and numbers, not as text that merely looks similar.
- Look for merged cells in the range; merged layouts can interfere with sorting and are usually unsuitable for a conventional row-based table.
- After sorting, spot-check a few records across multiple columns to verify that their values stayed together.
Sort with filters and filter views
A filter adds dropdown controls to a header row. To create one, select the table and choose Data > Create a filter. Use a column’s filter control to sort its values or narrow which rows are displayed. Sorting through a filter is convenient for routine work, but users should still make sure the filter covers the full table and that headers are correctly identified.
Filter views are useful when collaborators need different ways to inspect the same data. Choose Data > Filter views > Create new filter view, then set the desired sort or filter conditions. A filter view lets a person work with a saved view without imposing that same filter on everyone’s current view. It is a view of the shared sheet, not a separate copy of the records, and users with access may still be able to edit the underlying data.
For a repeatable sort order that should not rearrange the source, a SORT formula is often more suitable than a filter. For a one-time cleanup of a table, sorting the selected range is usually more direct. Choose based on whether you need to alter the displayed row order, preserve the source order, or let collaborators switch among saved views.
Common sorting problems and fixes
Only one column moved. Undo promptly if the records have become mismatched, then select the complete table and sort the range again. Avoid sorting a single column when neighboring columns contain related information.
The order looks wrong. Check for inconsistent values, extra spaces, misspellings, or numbers stored as text. For a custom category order, ordinary A-to-Z sorting follows alphabetic order, not the sequence you have in mind; use numeric ranks instead. Check that every category is represented in the rank mapping.
Headers appear among the sorted records. Confirm that the selected range starts with the header row and check Data has header row in Advanced range sorting options. If the selection starts below the labels, do not tell Sheets that the first selected row is a header.
The formula output cannot expand. A SORT result needs a clear area to display all returned rows and columns. Remove blocking content from the output area or move the formula to a larger empty region. Also confirm that the formula’s range includes the records you expect, but excludes headings if you do not want them sorted as data.
New rows are not included. A manually selected range may not extend to future records. Update the selected range when sorting again, or use a formula range designed to cover the expected data. Avoid excessively broad ranges if they include unrelated content or make a formula’s output harder to manage.
Google Sheets and Excel custom sorts
Google Sheets and Microsoft Excel both support sorting by multiple columns and sorting ranges while keeping rows together. Their interfaces and some options differ. In Sheets, use Data > Sort range > Advanced range sorting options for a multi-key range sort. Excel for Microsoft 365 on Windows has its own Sort dialog, reached through Data > Sort, and it supports custom lists such as a manually defined sequence of labels. Do not assume a custom list configured in Excel will be available as a native custom-list option in Sheets; use a helper rank in Sheets for portable, explicit ordering.
Another difference is collaboration: Sheets is designed around a shared online spreadsheet and includes filter views that help people work with distinct viewing arrangements. Excel also offers tables, filters, and sorting features, but file behavior can depend on whether it is opened in desktop Excel, Excel for the web, or converted between formats. If a workbook moves between the programs, check formulas, sort rules, and category mappings rather than assuming every feature transfers identically.
Frequently Asked Questions
Can I sort Google Sheets by more than one column?
Yes. Select the full table, open Data > Sort range > Advanced range sorting options, and use Add another sort column. The first key sets the main groups; later keys order records within ties.
How do I sort by a custom order such as High, Medium, Low?
Add a helper column that assigns a number to each label, with the number sequence matching the order you want. Sort the entire table by that helper column from smallest to largest.
Can I sort data without changing the original order?
Yes. Use SORT in an empty area or another sheet to display a sorted result. The source range remains in place, while the formula output reflects changes to the source.
Why did sorting separate names from their other information?
Usually, only one column was selected rather than the whole table. Undo the sort if possible, then select every column in each record and sort the range using the desired key column.
Can I make Google Sheets sort automatically when I edit a cell?
A SORT formula can update a separate displayed result as source data changes. A manual sort of the original range does not act like a live formula; for automated changes to the source order, you would need a script or another workflow and should account for collaborators’ edits.
Related
- Google Sheets Data Cleaning: Tools, Steps, and Tips
- How to Add an Image Box to an Excel Data Entry Form
- Regression Analysis in Excel: Steps, Results, and Meaning
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Shortcut Keys: Essential Shortcuts for Everyday WorkIf you mean important Excel shortcut keys, start with Ctrl+C to copy, Ctrl+V to paste, Ctrl+Z to undo,…
- How to Keep Track of Bills in ExcelTo keep track of bills in Excel, create a list with one row per bill due, record its…
- How to Mail Merge in Word for Personalized Email MessagesTo mail merge in Word for email, prepare a recipient list in Excel, connect it to a Word…
- Project Tracker Spreadsheet Best Practices for TeamsFor a reliable project tracker spreadsheet, use one row per task, assign each task a stable ID and…
- How to Archive Old Emails in Outlook 365 and Find ThemTo archive old emails in Outlook 365, select the messages and choose Archive; Outlook moves them to the…
- How to Delete a Page Range in Word Without Losing TextTo delete a page range in Word, select the content from the beginning of the first page through…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.