How to Alphabetize a List in Word, Excel, Google Docs and Sheets

Step-by-step instructions, including sorting names by last name

The quickest way to alphabetize any list is to paste it into our free alphabetize tool, click Sort A-Z and copy the result back. If you would rather stay in your own program, here is how to do it in the most common ones.

Microsoft Word

  1. Select the list you want to sort. Each item should be its own paragraph (one item per line).
  2. On the Home tab, in the Paragraph group, click Sort (the A/Z button with a down arrow).
  3. In the Sort Text box, set Sort by to Paragraphs and Type to Text.
  4. Choose Ascending for A to Z or Descending for Z to A, then click OK.

Sort by last name in Word: in the Sort Text box click Options, choose Other under "Separate fields at", type a single space and click OK. Then set Sort by to Word 2. This works when every name is exactly "First Last". If some names include a middle name, use the Sort by last word option in our alphabetizer instead, which always uses the final word.

Google Docs

Google Docs has historically had no built-in command to sort lines or paragraphs. You have three options:

Google Sheets

  1. Put one item per cell in a single column, for example A2 down to A50.
  2. Select the cells, then choose Data → Sort range → Sort range by column A (A to Z).

To keep the original list and show a sorted copy, use a formula in another column: =SORT(A2:A50). For Z to A, use =SORT(A2:A50, 1, FALSE).

By last name: =SORT(A2:A50, REGEXEXTRACT(A2:A50, "\S+$"), TRUE) sorts full names by their last word. Keep the range free of empty cells, or the formula returns an error.

Microsoft Excel

  1. Click any cell in the column you want to sort.
  2. On the Data tab, click Sort A to Z (or Sort Z to A). You can also use Home → Sort & Filter.
  3. If Excel asks, choose Expand the selection so the other columns in each row stay with their item.

In Excel for Microsoft 365 and Excel 2021 or later, =SORT(A2:A50) returns a sorted copy. In Microsoft 365, =SORTBY(A2:A50, TEXTAFTER(A2:A50, " ", -1)) sorts names by the last word.

The Rules of Alphabetical Order

Last updated: October 4, 2026

Frequently Asked Questions

How do I put a list in alphabetical order quickly?

Paste it into the free alphabetize tool on WordCounter.biz, one item per line, and click Sort A-Z. It also handles comma-separated lists, last names and duplicates.

How do I alphabetize in Word?

Select the list, go to Home, click Sort in the Paragraph group, choose Sort by Paragraphs and Type Text, pick Ascending and click OK.

Can Google Docs sort a list alphabetically?

Google Docs has historically had no built-in sort command for lines. Use an add-on, paste the list into Google Sheets and use Data, Sort range, or use an online alphabetizer and paste the result back.

How do I sort names by last name?

In Word, use Sort, Options, separate fields at a space and sort by Word 2. In Sheets or Excel, sort by a formula that extracts the last word. In the WordCounter.biz alphabetizer, tick Sort by last word.