Sort Google Sheets by Last Name: A-Z

Sorting data in Google Sheets can significantly enhance your productivity and analysis capabilities. One common sorting task is arranging data alphabetically by...

Sorting data in Google Sheets can significantly enhance your productivity and analysis capabilities. One common sorting task is arranging data alphabetically by last name. This can be particularly useful when managing large datasets like customer lists, employee directories, or student records. Let's explore how to sort alphabetically by last name in Google Sheets.

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 steps, ensure that your data is structured with first names in one column and last names in another. For this guide, let's assume your data is in columns A (First Name) and B (Last Name).

How to Extract Last Names from Full Names in Excel Documents
How to Extract Last Names from Full Names in Excel Documents

Sorting Data Using the Sort Feature

The most straightforward method to sort data alphabetically by last name is by using Google Sheets' built-in Sort feature.

How to Sort by Last Name in Excel - 5 Methods - ExcelDemy
How to Sort by Last Name in Excel - 5 Methods - ExcelDemy

First, select the range of cells containing your data. Then, click on 'Data' in the menu, hover over 'Sort A → Z' or 'Sort Z → A', and choose 'Sort by column B' (or the column containing your last names).

Sorting Ascending (A → Z)

How to Separate First Name Middle Name and Last Name in Excel Using Formula - ExcelDemy
How to Separate First Name Middle Name and Last Name in Excel Using Formula - ExcelDemy

To sort your data in ascending order (from A to Z), select 'Sort A → Z'. This will arrange your data with last names from A to Z.

For example, if your data includes 'Smith, John' and 'Johnson, Emily', sorting in ascending order will place 'Smith, John' before 'Johnson, Emily'.

Sorting Descending (Z → A)

Merge Two Columns in Excel with First Name and Last Name - ExcelDemy
Merge Two Columns in Excel with First Name and Last Name - ExcelDemy

To sort your data in descending order (from Z to A), select 'Sort Z → A'. This will arrange your data with last names from Z to A.

Using the same example, sorting in descending order will place 'Johnson, Emily' before 'Smith, John'.

Sorting Data Using the SORT Function

How to Make Alphabetical List in Excel (3 Ways) - ExcelDemy
How to Make Alphabetical List in Excel (3 Ways) - ExcelDemy

Another method to sort data alphabetically by last name is by using the SORT function. This method is more versatile as it allows you to sort data based on multiple columns and apply custom sorting orders.

To use the SORT function, enter the following formula in a new cell: `=SORT(range, [sort_index], [sort_order], [by_col])`. Here's a breakdown of the formula:

How to Perform Custom Sort in Excel - 3 Steps - ExcelDemy
How to Perform Custom Sort in Excel - 3 Steps - ExcelDemy
How to Automatically Update Smartsheet from Google Sheets
How to Automatically Update Smartsheet from Google Sheets
How to Use the SORT function in Google Sheets - ModernSchoolBus.com
How to Use the SORT function in Google Sheets - ModernSchoolBus.com
How to Count Number of Occurrences in a Column in Google Sheets
How to Count Number of Occurrences in a Column in Google Sheets
How to Perform Multiple Level Data Sorting in Excel
How to Perform Multiple Level Data Sorting in Excel
How to Randomize List of Names in Excel: 8 Easy Methods - ExcelDemy
How to Randomize List of Names in Excel: 8 Easy Methods - ExcelDemy
How to Apply Sheet Name Code in Footer in Excel (3 Ways) - ExcelDemy
How to Apply Sheet Name Code in Footer in Excel (3 Ways) - ExcelDemy
Determine Sheet Name Limit in Excel (with Easy Steps) - ExcelDemy
Determine Sheet Name Limit in Excel (with Easy Steps) - ExcelDemy
How to Match Names with Different Spelling in Excel - 8 Methods - ExcelDemy
How to Match Names with Different Spelling in Excel - 8 Methods - ExcelDemy
How to Create List of Unique Values from Multiple Sheets in Excel - ExcelDemy
How to Create List of Unique Values from Multiple Sheets in Excel - ExcelDemy
How to Separate Text and Numbers in Excel (6 Suitable Ways) - ExcelDemy
How to Separate Text and Numbers in Excel (6 Suitable Ways) - ExcelDemy
How to Use Wildcards in Excel (4 Easy Methods) - ExcelDemy
How to Use Wildcards in Excel (4 Easy Methods) - ExcelDemy
I will clean and format your excel and google sheet contact database
I will clean and format your excel and google sheet contact database
How to Use the INDEX MATCH with Excel VBA - 9 Steps - ExcelDemy
How to Use the INDEX MATCH with Excel VBA - 9 Steps - ExcelDemy
How to Split Names Using Formula in Excel: 5 Easy Methods - ExcelDemy
How to Split Names Using Formula in Excel: 5 Easy Methods - ExcelDemy
How to Put a Diagonal Line in Google Sheets - ModernSchoolBus.com
How to Put a Diagonal Line in Google Sheets - ModernSchoolBus.com
How to Compare Two Columns in Google Sheets
How to Compare Two Columns in Google Sheets
How to Split Excel Sheet into Multiple Sheets Based on Column Value - ExcelDemy
How to Split Excel Sheet into Multiple Sheets Based on Column Value - ExcelDemy
Top 7 Hacks for Microsoft Excel That’ll Save You Hours in 2023
Top 7 Hacks for Microsoft Excel That’ll Save You Hours in 2023
Print Titles in Excel - ExcelDemy
Print Titles in Excel - ExcelDemy
  • range: The range of cells containing your data.
  • sort_index: The column number to sort by. For last names in column B, use 2.
  • sort_order: The order to sort. Use 1 for ascending (A → Z) or -1 for descending (Z → A).
  • by_col: Whether to sort by columns (TRUE) or rows (FALSE). For most cases, leave this as FALSE.

For example, if your data is in A2:B100, enter the following formula in a new cell: `=SORT(A2:B100, 2, 1, FALSE)`. This will sort your data in ascending order by last names in column B.

Sorting Multiple Columns

The SORT function also allows you to sort data based on multiple columns. To do this, simply add more sort_index values separated by commas.

For example, to sort data first by last name (column B) and then by first name (column A) in ascending order, use the following formula: `=SORT(A2:B100, {2, 1}, 1, FALSE)`.

Mastering these sorting methods will help you efficiently manage and analyze data in Google Sheets. Happy sorting!