Sort Last Names in Google Sheets: Step-by-Step Guide

Sorting data in Google Sheets can be a breeze once you know the right steps. Today, we're going to tackle a common task: sorting a column by last name. This can...

Sorting data in Google Sheets can be a breeze once you know the right steps. Today, we're going to tackle a common task: sorting a column by last name. This can be particularly useful when you have a list of contacts, students, or employees, and you want to organize them alphabetically by their last names.

How to sort full names by last name in Google sheets?
How to sort full names by last name in Google sheets?

Before we dive into the sorting process, ensure that your data is clean and formatted correctly. Google Sheets can handle mixed data types, but for a smooth sort, it's best to have all last names in a single column and formatted as text.

How to Group Rows and Columns in Google Sheets
How to Group Rows and Columns in Google Sheets

Sorting a Single Column by Last Name

If your last names are in a single column, the sorting process is straightforward. Here's how you can do it:

How to Number Rows in Google Sheets (Add Serial Numbers)
How to Number Rows in Google Sheets (Add Serial Numbers)

1. **Select the column** you want to sort. To do this, click on the header of the column (e.g., if your data starts from A2, click on A1).

Using the Data Menu

How to Sort by Name in Excel (3 Examples) - ExcelDemy
How to Sort by Name in Excel (3 Examples) - ExcelDemy

2. **Click on 'Data'** in the menu, then select '**Sort A โ†’ Z**' or '**Sort Z โ†’ A**' depending on your preference. This will sort your column in ascending (A โ†’ Z) or descending (Z โ†’ A) order.

3. **Confirm the sort** by clicking 'Yes' when prompted. Your column will now be sorted by last name.

Using the Sort Feature

Grouping Rows/Columns in Excel๐Ÿ“š
Grouping Rows/Columns in Excel๐Ÿ“š

2. **Click on 'Data'** in the menu, then '**Sort**'.

3. **In the 'Create a sort' window**, ensure your 'Sort by' column is correct, and select '**Last name**' from the dropdown. Choose your preferred '**Sort order**' (A โ†’ Z or Z โ†’ A), and click '**Sort**'.

4. **Confirm the sort** by clicking 'Yes' when prompted. Your column will now be sorted by last name.

Split Text to Columns in Google Sheets (separate first and last name)
Split Text to Columns in Google Sheets (separate first and last name)

Sorting a Column with First and Last Names

If your column contains both first and last names, you'll need to extract the last names first. Here's how you can do it:

an excel spreadsheet showing the number and type of columns in each column,
an excel spreadsheet showing the number and type of columns in each column,
How to Sort Columns Like a Pro in Google Sheets
How to Sort Columns Like a Pro in Google Sheets
Google Sheets: Merge Data into One Column - Teacher Tech with Alice Keeler
Google Sheets: Merge Data into One Column - Teacher Tech with Alice Keeler
How to Make a Numbered List in Google Sheets
How to Make a Numbered List in Google Sheets
Contact list template for Google Sheets with built in search
Contact list template for Google Sheets with built in search
How To Combine Names In Google Sheets  #googlesheets #excel #spreadsheets
How To Combine Names In Google Sheets #googlesheets #excel #spreadsheets
Free To-Do List Template: Excel & Google Sheets Spreadsheet for Tasks
Free To-Do List Template: Excel & Google Sheets Spreadsheet for Tasks
Google Sheets: Split Text to Columns - Teacher Tech with Alice Keeler
Google Sheets: Split Text to Columns - Teacher Tech with Alice Keeler
How to Compare Two Columns in Google Sheets
How to Compare Two Columns in Google Sheets
Build Your Own To-Do List in Google Sheets | Easy Tutorial for Beginners
Build Your Own To-Do List in Google Sheets | Easy Tutorial for Beginners
How to Rename a Column in Google Sheets - ModernSchoolBus.com
How to Rename a Column in Google Sheets - ModernSchoolBus.com
Handy Cheat Sheets โ€“ Microsoft Office | CustomGuide
Handy Cheat Sheets โ€“ Microsoft Office | CustomGuide
How to delete all blank columns in your worksheet at once using Go To Special. ๐Ÿ•บ
How to delete all blank columns in your worksheet at once using Go To Special. ๐Ÿ•บ
a laptop with google sheets on it and the words google sheets for teachers above it
a laptop with google sheets on it and the words google sheets for teachers above it
an excel spreadsheet with multiple columns in the bottom row, and one column below
an excel spreadsheet with multiple columns in the bottom row, and one column below
How to Use the SORT function in Google Sheets - ModernSchoolBus.com
How to Use the SORT function in Google Sheets - ModernSchoolBus.com
Build a Google Sheets Second Brain
Build a Google Sheets Second Brain
Customizing Alternating Colors of a Table in Google Sheets
Customizing Alternating Colors of a Table in Google Sheets
Google Sheets - Column Charts, Bar Chart with Line & Trendline Tutorial
Google Sheets - Column Charts, Bar Chart with Line & Trendline Tutorial
How to Use Alternate Colors in Google Sheets
How to Use Alternate Colors in Google Sheets

1. **Select the column** with first and last names. Again, click on the header of the column.

Using the SPLIT Function

2. **Enter the following formula** in a new column: `=ARRAYFORMULA(IFERROR(REGEXEXTRACT(A2:A, "\w+$")))`. This uses the REGEXEXTRACT function to pull the last name from each cell. The `\w+$` part of the formula matches the last word in each cell, which should be the last name.

3. **Press Enter** to apply the formula. Your last names should now be in the new column.

4. **Follow the steps** from the previous section to sort the new column of last names.

Using the SPLIT Function with Delimiters

2. **Enter the following formula** in a new column: `=ARRAYFORMULA(IFERROR(SPLIT(A2:A, " ")))`.

3. **Press Enter** to apply the formula. This will split each cell into an array of words, with the last word (last name) in the second position of the array.

4. **Enter the following formula** in another new column to extract the last name: `=ARRAYFORMULA(IFERROR(INDEX(B2:B, 0)))`.

5. **Press Enter** to apply the formula. Your last names should now be in the new column.

6. **Follow the steps** from the previous section to sort the new column of last names.

And there you have it! You've now mastered the art of sorting a column by last name in Google Sheets. This skill will serve you well in many data management tasks. Happy sorting!