You have a list of names, products, keywords or places — and it is in no order at all. Finding anything in it means reading the whole thing, and adding a new item means guessing where it belongs. Sorting it alphabetically fixes that in seconds, in Excel, in Google Sheets, or in your browser with no software at all.

The quickest way: sort it online

If your list is plain text — one item per line, copied from a document, a chat message or a web page — the fastest method is a free online sorter. Paste the list into our free Alphabetical Text Organizer, choose A–Z or Z–A, and click Sort. The sorted list appears instantly, and you can copy it back wherever it came from.

There is nothing to install, no spreadsheet to open, and no formula to remember. It also handles the small jobs Excel makes awkward: removing duplicate lines while sorting, ignoring empty lines, and sorting a list that is already half-sorted. For a quick tidy-up of a name list, a keyword list or a set of bullet points, this is the method to reach for first.

Our guide to the Alphabetical Text Sorter explains the tool in more detail, including the reverse-sort and duplicate-removal options.

How to sort a list alphabetically in Excel

Excel has two ways to sort: the Sort button, which changes the list in place, and the SORT function, which builds a sorted copy that updates itself.

Using the Sort button:

  1. Select the cells you want to sort — one column, or the whole table if the list has more than one column.
  2. Go to the Data tab and click Sort A to Z (or Sort Z to A for reverse order).
  3. If your selection includes a header row, tick My data has headers in the Sort window so the header stays at the top.
  4. Click OK. The list is sorted in place.

If your list is part of a table with several columns — say, a name in column A and a score in column B — select the whole table before sorting. Sorting one column on its own scrambles the rows: the names end up alphabetical, but the scores stay where they were, matched to the wrong people.

Using the SORT function:

In newer versions of Excel and in Microsoft 365, type =SORT(A2:A50) in an empty cell, and Excel fills in a sorted copy of the range A2:A50. Add a second argument for reverse order: =SORT(A2:A50, 1, -1). The advantage is that the sorted copy updates itself whenever the original list changes. The disadvantage is that it needs a spare area of the sheet, and it does not work in older Excel versions.

How to sort a list alphabetically in Google Sheets

Google Sheets works almost exactly like Excel, with the same two approaches.

Using the menu: select the column, then click Data > Sort range > Sort range by column A (A to Z). If your range has a header, tick Data has header row first. For the whole sheet, use Data > Sort sheet by column A (A to Z) instead.

Using the SORT function: type =SORT(A2:A50) in an empty cell for A–Z order, or =SORT(A2:A50, 1, FALSE) for Z–A. Like Excel's version, the result updates itself when the original list changes.

A–Z or Z–A: which order do you need?

Most lists are sorted A–Z: names in a register, products in a catalogue, keywords in a list. Z–A is useful less often — for showing the newest items first when the list starts with a year, or the highest grades at the top when it starts with a letter grade. Excel, Sheets and the online sorter all offer both directions.

What happens to numbers, capitals and duplicates?

Sorting is simple until the list contains something other than plain lowercase words. Here is how Excel, Sheets and most online sorters handle the awkward cases:

Capital letters. Excel's default sort ignores case: "apple", "Banana" and "cherry" sort as apple, Banana, cherry. If you need capitals to sort before lowercase, open the full Sort window, click Options, and tick Case sensitive.

Numbers. Numbers sort before letters, in numeric order: 2, 10, 100 — not 10, 100, 2. That only works if the cells are real numbers. If a column contains numbers stored as text, Excel sorts them as text, and "10" comes before "2". The fix is to select the column and use Data > Text to Columns to convert them.

Duplicates. Sorting does not remove duplicates — it groups them together, so all the "Ahmed"s sit in one block. To remove them in Excel, use Data > Remove Duplicates after sorting. In Google Sheets, use Data > Data cleanup > Remove duplicates. In the online sorter, tick the remove-duplicates option and it happens in the same step.

Common sorting problems (and how to fix them)

The header row got sorted into the list. You sorted without ticking "My data has headers" (Excel) or "Data has header row" (Sheets). Undo with Ctrl+Z and sort again with the box ticked.

Only one column sorted and the rows are scrambled. You selected a single column of a multi-column table. Undo, select the whole table, and sort again. Better still, turn the range into a proper table first (Ctrl+T in Excel, or Format > Convert to table in Sheets), which keeps rows together automatically.

The order looks random. The list probably contains a mix of text and numbers, or hidden spaces. Check for leading spaces, convert text-numbers to real numbers, and sort again.

Which method should you use?

  • A plain text list, sorted once: use the free Alphabetical Text Organizer. Paste, click, copy — done in ten seconds.
  • A list inside a spreadsheet, sorted once: use the Sort button in Excel or Sheets.
  • A list that keeps changing: use the SORT function, so the sorted copy updates itself whenever the original changes.
  • A list with duplicates to remove: sort and remove duplicates in the same step, online or with Data > Remove Duplicates.

FAQ

How do I sort a list alphabetically in Excel? Select the list, go to the Data tab, and click Sort A to Z. If the list has a header row, tick "My data has headers" so the header stays at the top.

How do I sort a list alphabetically in Google Sheets? Select the column, then click Data, Sort range, and "Sort range by column A (A to Z)". For a live sorted copy, use the formula =SORT(A2:A50) in an empty cell.

How do I sort a list alphabetically online for free? Paste the list into our free Alphabetical Text Organizer, choose A–Z or Z–A, and click Sort. You can also remove duplicates and ignore empty lines in the same step.

Does sorting remove duplicates? No. Sorting groups duplicates together but keeps them. To remove them, use Data and then Remove Duplicates in Excel or Sheets, or tick the remove-duplicates option in the online sorter.

Why do numbers sort in the wrong order in Excel? Numbers stored as text sort like words, so "10" comes before "2". Convert them to real numbers first with Data and then Text to Columns, or sort them as numbers in the online sorter.

How do I sort Z to A instead of A to Z? In Excel or Sheets, click Sort Z to A instead of Sort A to Z. With the SORT function, add -1 (Excel) or FALSE (Sheets) as the sort order. In the online sorter, choose Z–A before clicking Sort.

The bottom line

Sorting a list alphabetically takes seconds once you know which tool to reach for: the online sorter for a plain text list, the Sort button for a spreadsheet you sort once, and the SORT function for a list that keeps changing. Watch out for the three classic traps — an unsorted header row, one column sorted without the rest, and numbers stored as text — and the result will be right first time.


Related: "Alphabetical Text Sorter" (blog), for the Alphabetical Text Organizer tool.