How To Sort By Last Name In Excel

To sort by last name in Excel, you can use the “Text to Columns” feature to separate the first and last names into individual columns, and then sort the data based on the last name column. The data will be sorted alphabetically based on the last name.

Sorting data in Excel is a fundamental task that helps us organize information efficiently. However, when it comes to sorting by last name, things can get a bit tricky. Excel’s default sorting options often prioritize first names over last names, making it frustrating to achieve the desired results. In this blog post, we will delve into the various methods and techniques you can employ to easily sort your data by last name in Excel. Whether you are managing a large dataset or simply trying to alphabetize a list of names, this guide will equip you with the knowledge and tools to effortlessly sort your data and streamline your workflow. So let’s get started and unlock the secrets of sorting by last name in Excel.

How To Sort By Last Name In Excel: Step-by-Step


Step 1: Prepare Your Excel Worksheet

The first step in preparing your Excel worksheet involves ensuring that your data is well-structured, clean, and ready for sorting. This is crucial in order to effectively manage and analyze your data.

To achieve this, it is important to organize your data into columns and rows. Each column should represent a specific attribute or data category, such as ‘First Name’, ‘Last Name’, ‘Email’, ‘Phone Number’, etc. This allows for easy identification and analysis of different data points.

Furthermore, it is advisable to include column headers for each attribute. For example, place the text ‘First Name’ in the first row of the column dedicated to storing first names. This provides a clear label for the data in that particular column and aids in understanding the content of the worksheet.

Additionally, it is essential to ensure that your data is clean, meaning there are no duplicates, inconsistencies, or errors. This can be achieved by removing any unnecessary spaces, correcting misspellings, and using data validation techniques to enforce data integrity.

By following these guidelines, you will have a well-structured and organized Excel worksheet that is ready for sorting, analyzing, and effectively managing your data.

Next Step

Step 2: Select Your Data

Once you have selected the cells with data to sort, simply click and drag your mouse over them. However, if you wish to sort all the data in your worksheet, skip the clicking and dragging step and move on to the next one.

Next Step

Step 3: Navigate to Sort & Filter

To access the ‘Sort & Filter’ option in Excel, locate and click on the button with the same name in the ‘Editing’ group on the ‘Home’ tab of the Excel Ribbon.

Next Step

Step 4: Click on Custom Sort

A dropdown menu will appear when you click on ‘Sort & Filter’. In this menu, select ‘Custom Sort’ to define your own sorting criteria and order for the data.

Next Step

Step 5: Define Your Custom Sort

In the Custom Sort Window, check the ‘My data has headers’ box to let Excel recognize the first row as the headers. From the ‘Sort by’ dropdown, select the ‘Last Name’ column header.

Next Step

Step 6: Confirm Sort Order

Under the ‘Order’ option, you can select the preferred sorting arrangement for your last names. Choose ‘A to Z’ to arrange them in ascending order, or opt for ‘Z to A’ to sort them in descending order.

Next Step

Step 7: Apply Sort

Once you have chosen your preferences, simply click on ‘OK’. As a result, the information in your worksheet will be arranged and organized according to the ‘Last Name’ field, following the specific order you determined.


In conclusion, sorting by last name in Excel can greatly enhance your data organization and analysis capabilities. By following the steps mentioned in this blog post, you can easily sort your data alphabetically by last name, whether you have a small list or a massive database. Remember to check the formatting of your data and choose the right options in the Sort dialog box to achieve accurate and desirable results.

Sorting by last name can be particularly helpful in various scenarios, such as organizing employee lists, customer databases, or contact directories. It allows you to quickly find and group individuals based on their last names, making it easier to extract meaningful insights from your data.

Moreover, mastering the skill of sorting by last name in Excel can save you valuable time and effort, especially when dealing with frequently updated lists or collaborative projects. With just a few clicks and the application of the correct sorting techniques, you can keep your data up-to-date and well-organized.

Excel offers a wide range of powerful features and functionalities, and knowing how to sort data by last name is just one of them. By continuously expanding your knowledge and exploring other Excel capabilities, you can further optimize your workflow and improve your productivity.

So, go ahead and start sorting your data by last name in Excel. With a little practice, you will soon become proficient in this task, and it will become second nature to you. Remember, the more you explore and experiment with Excel, the more proficient you will become in using this versatile software to its fullest potential.

Thank you for reading this blog post, and we hope it has provided you with valuable insights and guidance on sorting by last name in Excel. Happy sorting!

Table of Contents