How to Sort by Last Name in Excel: A Step-by-Step Guide for Beginners

How to Sort by Last Name in Excel

Sorting by last name in Excel might sound like a tech puzzle, but it’s pretty straightforward. Here’s a quick overview: you’ll split the full names into first and last names, then sort the list by the last names. It’s a two-step process but don’t worry, we’ll break it down step-by-step so you can follow along easily.

Step-by-Step Tutorial on How to Sort by Last Name in Excel

In this section, you’ll learn how to split full names into first and last names and then sort your data by the last names. This will help you organize your list alphabetically by last names.

Step 1: Open Your Excel File

First, open the Excel file that contains the names you want to sort.

It’s important to ensure your spreadsheet is ready for editing. Always make a backup copy of your file before making significant changes, just in case something goes awry.

Step 2: Insert New Columns

Next, insert two new columns to the right of the column containing full names.

You’ll need these new columns to separate the first and last names. Label them "First Name" and "Last Name" to keep things organized.

Step 3: Use the Text to Columns Feature

Now, select the column with full names, then go to the Data tab and click Text to Columns.

This feature helps you split the full names into two parts. Choose "Delimited" and click Next.

Step 4: Choose Space as the Delimiter

In the Text to Columns wizard, select Space as the delimiter and click Finish.

By using Space as a delimiter, Excel will know to separate the first name from the last name at the space between them. This will populate your new columns with the separated names.

Step 5: Copy Last Names to a New Column

Copy the last names from the newly created column to the "Last Name" column you inserted earlier.

This step is crucial to ensure your last names are in one dedicated column, making sorting easier.

Step 6: Sort by Last Name

Click on the column header of the "Last Name" column, then go to the Data tab and click on Sort A to Z.

This will sort your entire list alphabetically by last names. Make sure your entire data range is selected to avoid any misalignment.

Step 7: Clean Up

Finally, you can hide or delete the extra columns if you don’t need them anymore.

This will tidy up your spreadsheet and leave you with a neatly sorted list by last names.

After completing these steps, your names will be sorted alphabetically by last name, making it much easier to find specific individuals in your list.

Tips for Sorting by Last Name in Excel

  • Make a backup of your Excel file before starting.
  • Double-check that names are consistently formatted before splitting them.
  • If names have middle initials, consider how that might affect your split.
  • Use the Undo feature (Ctrl+Z) liberally if you make a mistake.
  • Practice on a small dataset before applying these steps to a large list.

Frequently Asked Questions

What if my names include middle initials?

If names include middle initials, the Text to Columns feature will split the initials into a separate column. You may need to manually adjust these entries.

Can I sort by first name instead?

Yes, you can sort by any column in Excel. To sort by first name, follow the same steps but use the "First Name" column.

What if some cells have only one name?

For cells with only one name, the Text to Columns feature will place that name in the first name column, leaving the last name column blank. You may need to manually adjust these entries.

Can I undo the sort?

Yes, you can undo the sort by pressing Ctrl+Z immediately after sorting.

What if I need to sort by last name and then by first name?

You can perform a multi-level sort by selecting the last name column first, and then adding the first name column as a secondary sort criterion.


  1. Open your Excel file.
  2. Insert new columns.
  3. Use the Text to Columns feature.
  4. Choose Space as the delimiter.
  5. Copy last names to a new column.
  6. Sort by last name.
  7. Clean up.


Sorting by last name in Excel can be a lifesaver when dealing with large datasets. It not only makes your data more organized but also easier to navigate. Whether you’re managing a class roster, a client list, or any other set of names, this skill is invaluable.

Remember to always back up your data and double-check your formatting before diving into the sorting process. With these steps, you should now feel more confident in your ability to sort by last name in Excel. If you found this guide helpful, you might want to explore more Excel tutorials to further sharpen your skills. Happy sorting!

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy