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.
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.
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.
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.
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.
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
A small pop-up window will appear, from the dropdown available select Space. If your names are separated by a comma, select comma. etc.
With the space selection made, the second name values have now been moved from cells A2 to A10 to B2 to B10
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)
The dataset is now sorted by alphabetical order of the last name values in column B
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.