To sort a list A to Z in Google Sheets, select the full range of related cells, open Data > Sort range > Advanced range sorting options, choose the column to sort by, select A to Z, and click Sort. If your range has a header row, check the header-row option first so the headings stay at the top. Sorting rearranges rows by the selected column; selecting the full table helps keep each record together.
What You’ll Need
- A Google account with access to the spreadsheet in a web browser.
- A clear idea of which column should determine the order, such as Last Name, City, or Product.
- A complete data range, including every column that belongs with each record. If you have a header row, identify it before sorting.
- Editing permission. If the sheet is view-only or a range is protected, you may need the owner to grant access or change the protection.
Before changing the order, consider making a copy if the current order matters or you are unsure which cells belong together. Use File > Make a copy to create a separate version. Sorting normally can be undone with the undo button, but a copy provides a safer fallback if other edits follow.
Step-by-Step
- Open the spreadsheet and locate the table. Find the rows you want to rearrange and note the column that should control the order. For example, if each row contains a customer name, email address, and city, sorting by the name column should move all three pieces of information together. Do not sort just the name cells unless they are genuinely a standalone list.
- Select the entire data range. Click the first cell in the table, then drag to the bottom-right cell so every relevant column and row is highlighted. You can also click the first cell, hold Shift, and click the last cell. Include the header row if one exists, but do not include unrelated notes or a second table. If you are uncertain about the boundary, check the first and last rows before proceeding.
- Open the range-sorting options. With the range selected, choose Data > Sort range > Advanced range sorting options from the menu at the top of Google Sheets. The advanced dialog lets you select the sort column and say whether the selected range has a header row. It is a good choice for a table because you can verify both settings before the rows move.
- Tell Sheets whether the range has a header. If the first row contains labels such as Name, Email, and City, turn on Data has header row. The header is then treated as a label rather than an ordinary record. If the first row is actual data, leave the box unchecked. Do not rely only on bold text or a frozen row to identify a header; choose the setting based on what that first row contains.
- Choose the column to sort by. In the sort-by dropdown, choose the correct column heading if you marked a header row. Otherwise, select the column letter shown for that field. Check carefully if two headings are similar, such as First Name and Last Name. If the dropdown shows an unexpected column, cancel and confirm that you selected the intended range.
- Choose the A-to-Z order and sort. Select A to Z, then click Sort. Text is arranged in ascending order, so names beginning with A generally appear before names beginning with B. For numbers and dates, ascending order means smallest to largest and earliest to latest, respectively; it does not mean the literal characters in their display are sorted as words.
- Check the results before continuing. Confirm that the first and last records look right, the header remains at the top, and details in other columns still match their original records. If the result is wrong, use the undo button immediately, then repeat the sort with the correct range, header setting, or sort column. Avoid making several additional edits before undoing, because undo may reverse those edits too.
Example: Suppose A1:C4 contains the headers Name, Department, and Extension, followed by three employee records. Select A1:C4, open the advanced range-sorting options, mark that the range has a header row, choose Name, select A to Z, and sort. The names change order, but each person’s department and extension move with that person’s row.
If you are sorting a simple list with no related columns, select only the list cells and use the same range-sorting options. If there is no header, leave the header option off. The key decision is the scope: a multi-column record needs its whole range selected, while an independent one-column list can be sorted by itself.
Common Mistakes
- Sorting one column inside a table. This can separate names from their phone numbers, prices, or other details. Select the full table range so Google Sheets sorts complete rows together.
- Including a header but not identifying it. If the header row is treated as data, its label may be sorted into the list. Check Data has header row in the advanced options when the first row contains labels.
- Choosing the wrong sort column. A table can have several text columns, and sorting by City instead of Name may still produce a plausible result. Verify the selected heading in the dialog before clicking Sort.
- Selecting extra cells or a neighboring table. A broad selection can bring blank areas, notes, or other data into the sort. Keep the range limited to the records that belong together.
- Expecting A to Z to sort every value as plain text. Numbers and dates that Sheets recognizes as numbers and dates sort by value. Text that only looks like a date or number may behave differently, so inspect unusual entries.
- Assuming a frozen top row is automatically a header. Freezing helps keep a row visible while scrolling; it does not replace the header-row setting in the sort dialog.
Tips
- Use filter controls for repeated sorting. Select the table including its header, then choose Data > Create a filter. Use the filter icon in the relevant header and choose Sort A to Z. This is convenient when you want to switch sort columns later. Apply the filter to the full table, not just one column.
- Keep the table rectangular. Consistent headers and one record per row make sorting easier to check. Avoid blank separator rows inside a dataset and avoid merged cells in the range, since irregular layouts can make sorting confusing or unavailable.
- Check text for hidden spaces. A name with an extra leading space may appear in an unexpected place. If you find inconsistent spacing, select the relevant cells and use Data > Data cleanup > Trim whitespace, then sort again. Review the data before applying cleanup to a shared sheet.
- Use a second sort key when needed. In the advanced range-sorting options, add another sort column if records should be grouped by one field and ordered within each group by another. For instance, sort by Department A to Z, then by Last Name A to Z. Put the main grouping field first.
- Remember that sorting changes row order for everyone viewing the sheet. If collaborators rely on the existing order, tell them before sorting or make a copy. For a temporary personal view, consider a filter view instead of changing the shared sheet’s regular order.
- Check the sheet’s locale for international text. Alphabetical ordering can depend on locale and how characters are represented. If accented characters or language-specific letters do not appear where expected, review the spreadsheet’s locale under File > Settings.
Troubleshooting
The header moved into the list. Undo the sort, select the full range again, reopen the advanced sorting options, and check Data has header row. Confirm that the selected range begins with the actual header row. If your table has title text above the headings, exclude that title row from the range.
Names sorted correctly, but their details no longer match. Undo immediately. The sort was probably applied to only one column or an incomplete range. Select the full set of columns and rows for each record, then sort by the desired column. If the sheet is filtered, make sure the filter covers the whole table.
The order looks almost alphabetical, but some entries are out of place. Inspect those cells for leading or trailing spaces, inconsistent spelling, or values stored as different types. For example, one date might be a real date and another might be text. Try trimming whitespace where appropriate, standardizing the entries, and sorting again. Check a few affected cells rather than changing the entire column blindly.
The sort command is unavailable or Sheets will not sort. Check whether you have edit access, whether the selected cells include protected data, and whether merged cells are present in the range. Ask the owner to adjust permissions or protection if needed. If merged cells are not essential, unmerge them carefully and make sure the data remains clear before trying again.
The wrong rows or an unexpected area moved. Use undo, then inspect the selection outline before repeating the sort. Look for a blank row that split the table, an accidentally included note, or a range that omitted one of the table’s columns. Set the range to exactly the records you intend to reorder.
Collaborators see an order change you did not intend. Sorting the regular sheet changes the shared row order. Undo if appropriate, or restore the desired order from a copy or version history if more edits have occurred. For future exploration, create a filter view using Data > Filter views so a view can be used without treating the shared sheet’s base order as a personal workspace.
Frequently Asked Questions
Can I sort a single column A to Z without changing other columns?
Yes, if the column is a standalone list and its values are not tied row-by-row to other data. If each row is a record, sort the entire table instead; otherwise, the values in other columns will no longer match.
How do I sort a column but keep the header at the top?
Select the full table, open Data > Sort range > Advanced range sorting options, check Data has header row, choose the column, and select A to Z. The header is excluded from the sorted records.
Does A to Z work for numbers and dates?
Yes. For recognized numbers, ascending order is smallest to largest; for recognized dates, it is earliest to latest. If values are stored as text, they may not sort as expected, so check their cell format and consistency.
Can I sort by more than one column?
Yes. In the advanced range-sorting dialog, add another sort column. The first column determines the main order, and the additional column orders records that share the same value in the first column.
Will sorting change the spreadsheet for other people?
A regular sort changes the shared sheet’s row order, so collaborators may see the result. Use a filter view when you need a separate view for sorting, or make a copy if you want to work independently.
Is sorting in Google Sheets the same as sorting in Excel?
The basic idea is the same, but the menus differ. These steps are for Google Sheets in a web browser; Excel has its own sort controls and dialog, so follow Excel-specific instructions when working in that program.
Related
- How to Clear Cache Files in Outlook Safely
- Clear Cache and Cookies in Outlook: Step-by-Step
- How to Clear Cache Data in Outlook
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Delete the Last Empty Page in Microsoft WordTo delete a last empty page in Word, go to the end of the document, turn on formatting…
- Google Sheets COUNTIF by Color: Practical Ways to CountGoogle Sheets’ COUNTIF cannot count cells by fill color directly: it evaluates cell values against a criterion, not…
- Excel Workbook vs Spreadsheet: What’s the Difference?An Excel workbook is the complete Excel file; a spreadsheet is the broader term for a grid-based document…
- How to Run a Query in Google SheetsTo run a query in Google Sheets, enter the QUERY function in an empty cell, give it a…
- COUNTA Excel vs COUNT: Which Cells Do They Count in a Range?In Excel, COUNT counts numbers in a range, while COUNTA counts cells that contain something, including text, numbers,…
- Excel Find and Replace Shortcut: Keys, Options, and TipsIn Excel for Microsoft 365 on Windows, press Ctrl+H to open Find and Replace, then enter the text…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.