Sort Excel by Last Name: A Step-by-Step Guide

Sorting data in Excel is a breeze once you understand the tools at your disposal. Today, we're going to focus on a common task: sorting cells by last name. This...

Sorting data in Excel is a breeze once you understand the tools at your disposal. Today, we're going to focus on a common task: sorting cells by last name. This can be particularly useful when you're working with a list of contacts, students, or employees, and you want to organize the data alphabetically for easy reference.

How to split full name to first and last name in Excel?
How to split full name to first and last name in Excel?

Before we dive into the steps, ensure that your data is structured correctly. The last names should be in a separate column, and there should be no blank cells or special characters that could interfere with the sorting process.

How To Split First and Last Name in Excel Sheet - How to Split Cells in Excel
How To Split First and Last Name in Excel Sheet - How to Split Cells in Excel

Sorting by Last Name in Excel

Excel offers a straightforward way to sort data based on specific columns. Here's how you can sort your cells by last name:

How to Sort Names Alphabetically in Excel
How to Sort Names Alphabetically in Excel

First, select the data range you want to sort. This should include the column with last names. To select a range, click and drag your mouse over the cells, or use the keyboard shortcut Ctrl + A (Windows) or Command + A (Mac).

Using the Sort & Filter Feature

Combine Cells in Excel
Combine Cells in Excel

The Sort & Filter feature is the most common way to sort data in Excel. Here's how to use it:

1. Click on the 'Data' tab in the Excel ribbon. In the 'Sort & Filter' group, click on the 'Sort' button.

2. In the 'Sort' dialog box, under 'Column', choose the column containing the last names. Under 'Sort On', select 'Values'. Under 'Sort', choose 'A to Z' or 'Z to A' depending on your preference.

[EP 6] Excel Tips Separate First and Last name
[EP 6] Excel Tips Separate First and Last name

3. Click 'OK'. Excel will sort the data in the selected range based on the last name column.

Using the AutoFilter Feature

Another way to sort data in Excel is by using the AutoFilter feature. This method is particularly useful when you want to sort data based on multiple columns or when you want to filter data as well as sort it.

How to Sort by Last Name in Excel
How to Sort by Last Name in Excel

1. Click on the header of the column containing the last names. A drop-down arrow will appear.

2. Click on the drop-down arrow and select 'Sort A to Z' or 'Sort Z to A' depending on your preference. Excel will sort the data in the selected range based on the last name column.

Extract Last Name using TEXTAFTER function in Excel
Extract Last Name using TEXTAFTER function in Excel
Split First and Last Name in Spreadsheet
Split First and Last Name in Spreadsheet
Quickly Name Selected Cells in Excel
Quickly Name Selected Cells in Excel
Excel Joining Two Text Columns First Name Last Name with Concatenation
Excel Joining Two Text Columns First Name Last Name with Concatenation
How to remove duplicates and replace with blank cells in Excel?
How to remove duplicates and replace with blank cells in Excel?
How to Combine Data From Different Cells in Excel
How to Combine Data From Different Cells in Excel
How to Separate First Names and Last Names Into Separate Fields in a Microsoft Excel List
How to Separate First Names and Last Names Into Separate Fields in a Microsoft Excel List
Split First & Last Name Using Power Query | MyExcelOnline
Split First & Last Name Using Power Query | MyExcelOnline
Freeze Cells in Excel
Freeze Cells in Excel
How to Split Text Data of a Cell to Column in Excel - ExcelDataPro
How to Split Text Data of a Cell to Column in Excel - ExcelDataPro
Merge Two Columns in Excel with First Name and Last Name - ExcelDemy
Merge Two Columns in Excel with First Name and Last Name - ExcelDemy
copy filename to excel with the text copy filename to excel below it and arrows pointing up
copy filename to excel with the text copy filename to excel below it and arrows pointing up
989K views ยท 11K reactions | ๐Ÿƒโ€โ™‚๏ธ๐Ÿ”ฃ๐Ÿ’ก Excel's Flash Fill feature can quickly separate First Name, Middle Name, and Last Name from a full name, or even First Name, Initial, and Last Name, saving you time a | Excel Formulas Unleashed
989K views ยท 11K reactions | ๐Ÿƒโ€โ™‚๏ธ๐Ÿ”ฃ๐Ÿ’ก Excel's Flash Fill feature can quickly separate First Name, Middle Name, and Last Name from a full name, or even First Name, Initial, and Last Name, saving you time a | Excel Formulas Unleashed
an excel spreadsheet with the text slant cells in excel on top of it
an excel spreadsheet with the text slant cells in excel on top of it
How to Find Average of Specific Cells in Excel (3 Handy Ways) - ExcelDemy
How to Find Average of Specific Cells in Excel (3 Handy Ways) - ExcelDemy
Sortby Function in Excel
Sortby Function in Excel
Use the & in Excel
Use the & in Excel
Format Cells- Add Zeros
Format Cells- Add Zeros
Excel Count Cells with Text - Text and Values, Count any Text, Occurrence of specific Text
Excel Count Cells with Text - Text and Values, Count any Text, Occurrence of specific Text
Separate first and last names in an Excel spreadsheet or Google Sheets
Separate first and last names in an Excel spreadsheet or Google Sheets

Note: Using the AutoFilter feature will sort the data in place. If you want to keep the original data intact, consider using the Sort & Filter feature instead.

Sorting by Last Name with a Space Before

Sometimes, you might have last names that start with a space, like " McDonald". In this case, Excel might not sort these names correctly because it considers the space as part of the last name. Here's how to handle this:

1. Before sorting, add a space before the last names that start with a space. This can be done quickly using the 'Find and Replace' feature. Press Ctrl + H (Windows) or Command + H (Mac) to open the 'Find and Replace' dialog box.

2. In the 'Find what' field, type a space (without any quotes). In the 'Replace with' field, leave it blank. Click 'Replace All'. This will remove the space before the last names that start with a space.

3. Now, follow the steps mentioned earlier to sort the data by last name. After sorting, you can remove the extra spaces using the 'Find and Replace' feature again.

Sorting data in Excel is a powerful tool that can help you analyze and present information more effectively. By mastering these sorting techniques, you'll be well on your way to becoming an Excel pro. Happy sorting!