In this article:

How to Sort by Last Name in Google Sheets (Easiest Way in 2024)

May 8, 2024

In this article, we will show how to sort by last name in google sheets. Simply follow the steps below.

For the purpose of this demonstration, an example data sheet was created. Access this by clicking the link below to follow along:

Click here to open the sample sheet.

Sort by Last Name when in a Separate Column to First Name

In situations where first and last name are in separate columns already, follow these steps to sort by last name. If first and last name are in separate columns see the second half of this guide. 

1. Highlight your Data Set

Highlight your data set containing the first and last names you want to sort by. We will be using the basic sort range option so we don’t want to highlight header rows.

It’s important to highlight starting with the first value in the last name column so that we can sort by that column in the next step.

2. In the File Menu Click Data > Sort Range > Sort Range by Column (A to Z)

You will see that sort range gives us the option to sort by column B, this is why it was necessary to select the first value in the last names column in the previous step.

3. Your Data Set Has Now Been Sorted by Last Name

Your data set is now sorted by the last name values in column B from Z to A. You can also sort from Z to A if preferred.

Sort by Last Name when in the Same Column as First Name

1. Highlight the entire data set then from the File Menu click “Data” followed by “Split text to columns”

Click and drag the selection to cover the data set you require to sort by last name. In the File menu click Data. From the dropdown select Split text to columns 

 Google Sheets sort by the last name

2. From the pop-up menu ‘Separator’ select “Space” 

A small pop-up window will appear, from the dropdown available select Space. If your names are separated by a comma, select comma. etc. 

Sorting by last name in Google Sheets

3. The Last Name values have now moved to a new column 

With the space selection made, the second name values have now been moved from cells A2 to A10 to B2 to B10

Last names sorted by Split in Google Sheets 

4. Re-highlight the data set, from the File Menu, select “Data” then “Sort range” followed by “Sort range by A to Z”

In order to sort the required date by last name it is important to note that when highlighting the data set you must start with the first cell of the second name values.

In this case, we will click to select then drag and highlight the data set from cell B2 to A10

With the dataset highlighted, go to the file menu and select Data. From the dropdown select Sort range and from the additional menu click Sort range by Column B (A to Z)

Google Sheets last name sort range 

5. The dataset is now arranged alphabetically by last name  

The dataset is now sorted by alphabetical order of the last name values in column B

Google Sheets data sorted by last name values

If you enjoyed this article, you might also like our article on how to sort by row in Google Sheets or our article on how to split a cell in Google Sheets. 

If you want to learn how to send emails from Google Sheets, we also suggest checking out our detailed guide. 

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->