Sorting a list of names in alphabetical order, especially by last name, can be a breeze with Excel's built-in sorting feature. However, if you're looking for a ...
Sorting a list of names in alphabetical order, especially by last name, can be a breeze with Excel's built-in sorting feature. However, if you're looking for a more dynamic approach using formulas, Excel offers several options. In this guide, we'll explore the Excel formula to alphabetize by last name, ensuring your data remains organized and easy to navigate.

Before we dive into the formulas, let's assume we have a dataset like this:

| First Name | Last Name |
|---|---|
| John | Doe |
| Jane | Smith |
| Mike | Johnson |

The SORT function in Excel is a powerful tool for arranging data in ascending or descending order. It's particularly useful when you need to sort by multiple columns or have complex sorting criteria.
To sort the above dataset by last name in ascending order, use the following formula:

Assuming your data starts from A1 (First Name) and B1 (Last Name), enter this formula in cell C1 and drag it down:
=SORT(B1:B5, 1)

This will sort the last names in ascending order (A to Z). To sort in descending order (Z to A), change the second argument to -1:
=SORT(B1:B5, -1)

If you want to sort by last name and then by first name, use the following formula:
=SORT(B1:B5, 1, 2)




















Here, 1 represents sorting by the first column (Last Name), and 2 represents sorting by the second column (First Name).
Another way to alphabetize by last name is by using the INDEX and MATCH functions together. This method is useful when you want to create a dynamic list of unique last names and their corresponding first names.
To create a list of unique last names, use the UNIQUE function:
=UNIQUE(B1:B5)
Now, to retrieve the corresponding first names, use the INDEX and MATCH functions together. Assuming your unique last names start from E1, enter this formula in F1 and drag it down:
=INDEX(A1:A5, MATCH(E1, B1:B5, 0))
This will return the first names corresponding to the unique last names in column E.
In conclusion, Excel provides several ways to alphabetize by last name, from the simple SORT function to the more dynamic INDEX and MATCH combination. Each method has its use cases, allowing you to choose the one that best fits your needs. Happy sorting!