To alphabetize data in Google Sheets, select the full range you want to sort, then choose Data > Sort range and sort by the relevant column from A to Z. If the range has a header, use the advanced sort options to mark it as a header row; this keeps the heading out of the alphabetical sort and, when you sort a table, keeps each row’s values together.
Choose the right kind of sort
Google Sheets offers two different ways to sort, and choosing between them matters. Sort range rearranges only the cells in the selected range. Sort sheet sorts rows across the sheet by the chosen column. For a normal table, sorting the full table range is usually the safest choice: it changes the order of the records without separating names from their associated details.
- Sort a range when you want to sort one table or a specific block of cells.
- Sort a sheet when the sheet contains one dataset and you intend to reorder its rows as a whole.
- Use a filter or filter view when you want to sort and inspect data interactively, especially if other people use the sheet.
For example, a list with columns for Name, Department, and Email should be sorted as a complete three-column range by Name. Sorting only the Name cells would leave the other columns in their original positions, making the records incorrect even though the names look alphabetized.
Sort a full table from A to Z
To alphabetize a table while preserving its rows, first identify its complete boundaries. Include every column that belongs to the records, and include the header row if you plan to tell Sheets that the first row is a header. Avoid selecting unrelated notes or a second table beside or below the data.
- Drag to select the table, including all of its data columns. Include the header row if there is one.
- Choose Data > Sort range > Advanced range sorting options.
- If your selection includes a heading row, check Data has header row.
- Choose the column you want to alphabetize, then select A to Z.
- Click Sort. The selected records are rearranged according to that column.
If your selection has no header, choose the sort column based on its column letter or position. For a simple range without a heading, Sheets may also offer direct sort choices under Data > Sort range. The advanced options are useful when you need to identify a header or sort by more than one column.
Sort an entire sheet
When a sheet contains one continuous dataset, you can click a cell in the column you want to use and choose Data > Sort sheet, then select an ascending A-to-Z or descending Z-to-A option for that column. The sheet sort reorders rows based on the selected column rather than sorting that column’s cells independently.
Use this carefully if the worksheet contains separate tables, explanatory text, or unrelated information elsewhere. A sheet-wide sort is not the right way to alphabetize one small list on a busy worksheet. In that situation, select just the relevant table and use Sort range. If you are uncertain, make a copy of the sheet or use Undo immediately if the result is not what you intended.
Keep the header and records together
A header such as “Customer” or “City” is a label, not a data value. If Sheets treats it as an ordinary row, it can move into the alphabetical results. In the advanced sort dialog, turn on Data has header row so you can select the column by its heading and keep the heading at the top.
For a table with no header, do not mark the first row as a header. Also check that your selection starts and ends at the actual table edges. If the selection omits a column—for example, you select names and cities but not the email column—the omitted values will not travel with their records. Before sorting, it is worth checking one or two rows to confirm that every field for each record is included.
Sort by a second column
Sorting by one column does not fully order records that share the same value. If you want people grouped by last name and then ordered by first name, use a multi-column sort. Select the complete table, open Data > Sort range > Advanced range sorting options, identify the header row if applicable, and add a second sort column. Set the primary column first and the secondary column next; each can have its own A-to-Z or Z-to-A direction.
For example, a contact list can be sorted first by City from A to Z and then by Last name from A to Z. The result groups each city together and alphabetizes names within each city. If your headings are not descriptive, consider adding clear headers before sorting; they make the correct sort keys easier to identify and reduce the risk of choosing the wrong column.
Use a filter to sort repeatedly
A filter adds controls to the header row so you can sort or narrow a table without opening the sort dialog each time. Select the table, including its headers, and choose Data > Create a filter. Filter buttons appear in the header cells. Open the button for the column you want and choose its A-to-Z or Z-to-A sort option.
Filters are useful for day-to-day work, but remember that sorting through a filter still changes the visible order of the data. If you need a personal arrangement that does not change what collaborators see, use a filter view instead. In Google Sheets, open Data > Filter views and choose an option to create a filter view. Filter views can have their own sorting and filtering settings, which is helpful when several people work with the same dataset.
Alphabetize with the SORT formula
If you want an automatically sorted copy while leaving the source list in place, use the Google Sheets SORT function. With the full records in A2:C10 and the names in the first column, enter =SORT(A2:C10,1,TRUE) in an empty cell. The formula returns the rows from A2:C10 ordered by the first column, ascending. Make sure the cells where the results need to appear are empty; an existing value in the output area can prevent the array result from expanding.
To sort the same records by a second column when there are ties, use =SORT(A2:C10,1,TRUE,2,TRUE). This assumes the records occupy A2:C10: it sorts by the first column in ascending order, then by the second column in ascending order within ties. The numbers identify positions within the specified range, not worksheet column letters. A formula-generated sorted list is a separate output; it does not physically reorder the original cells, and edits to the source can change the displayed results.
Names, numbers, and sorting surprises
Alphabetizing a full-name column sorts by the text at the start of each cell. “Amina Shah” will therefore be ordered under A, not S. If you need to sort by surname, put surnames in a separate column or create a correctly structured helper column; a normal alphabetical sort cannot infer which part of a name is the family name. This matters for names with multiple parts, compound surnames, and different naming conventions.
Other details can affect the result:
- Accents and locale: The spreadsheet’s locale can affect how text, accents, dates, and numbers are interpreted or ordered. If a sequence looks unexpected, check File > Settings and review the locale setting.
- Leading spaces: Extra spaces at the start of a cell can make entries appear out of place. Clean inconsistent text before sorting.
- Numbers stored as text: A column that mixes numeric values with text-formatted numbers may not sort as you expect. Make the values consistent before relying on a numeric order.
- Blank cells: Empty values can affect where records appear in the sorted list. If blank entries are not meaningful, remove them or filter them out before sorting.
- Duplicates: An alphabetical sort does not remove repeated entries. Use a separate duplicate-checking approach if your goal is a unique list.
Sorting changes order; it does not correct spelling, standardize capitalization, remove spaces, or decide how to treat duplicate records. It is often best to clean inconsistent data first, especially when a list will be used for reporting or shared with others.
Undo or recover from a wrong sort
If a sort produces an immediate mistake, use Edit > Undo, or press Ctrl+Z on Windows or Command+Z on Mac. Undo is most dependable before you make other changes. If you notice the problem later, the version history may help: open File > Version history > See version history to review earlier versions and restore one if appropriate. Restoring a version affects the sheet more broadly, so check what else changed since that point.
To prevent problems, use a complete range, confirm the sort column, and verify that the first few resulting rows still pair the right names with the right details. For important shared data, duplicate the sheet before a large reorganization. That provides a straightforward reference if the range boundaries or sort settings were wrong.
Frequently Asked Questions
How do I alphabetize one column without mixing up the other columns?
Select the entire table, not just the column of names, then choose Data > Sort range and sort by the name column. Sheets will move complete selected rows together.
How do I keep the header row at the top?
Include the header in the selected range, open Data > Sort range > Advanced range sorting options, and check Data has header row before choosing the sort column.
Can Google Sheets alphabetize by last name?
Not automatically when first and last names are combined in one cell. Separate the last names into their own column, then sort the full table by that column.
Can I alphabetize a list automatically as it changes?
Yes. Put a SORT formula in an empty area to display a sorted copy of the source range. The formula output updates as the source changes, but it does not rearrange the original data.
What is the difference between A to Z and Z to A?
A to Z is ascending order, beginning with earlier alphabetical entries; Z to A is descending order, beginning with later entries. The same controls can also sort many numeric and date columns in ascending or descending order.
Related
- Excel Data Model: How to Group Dates in PivotTables
- Power Query Keep Duplicates: How the Command Works
- Power Query to Combine Excel Files: A Practical Guide
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Table Color Not Changing? Common Causes and FixesIf an Excel table’s color is not changing, select a cell inside the table, open Table Design, and…
- Finance Spreadsheet in Google Sheets: Setup and FormulasA finance spreadsheet in Google Sheets can help you track income, spending, budgets, savings, and debt in one…
- How to Alphabetize Names in Google Sheets Step by StepTo alphabetize names in Google Sheets, select the full data range you want to keep together, then choose…
- Format Hours and Minutes in Excel for Clear ResultsTo format hours and minutes in Excel, select the cells, open Format Cells with Ctrl+1 on Windows, choose…
- How to Create a Business Email Signature in OutlookTo create a business signature in Outlook, open the signature settings for your version of Outlook, add your…
- Automatic Borders in Excel: How to Apply Them as You TypeTo make borders appear automatically in Excel, select the cells you want to format, then use Home >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.