In this article:

How to Sort by Number in Google Sheets [Best Method in 2024]

May 8, 2024

In this article we show you how to sort numbers in google sheets using the built in sort feature and by using the SORT function. The ability to order data is extremely useful in how data is understood, especially in larger sets of data. 

Sort Numbers in Google Sheets using the Built-in Feature

The built-in feature in Google Sheets is very useful for quick sorting on smaller sets of data. Number data can be sorted in a couple of ways, either in an ascending order (A-Z: lower to higher) or a descending(Z-A: higher to lower)

Example 1 - Sort Numbers by Range

For this example we have created an example dataset of staff members and their staff numbers. To demonstrate how to sort number data in an ascending order (A-Z). Will now order the data by staff number. Click here to view the dataset and follow along.

Step 1: Highlight the data range you would like to sort

Drag to highlight the range of information in your dataset, in this example we need to ensure both names and numbers are highlighted otherwise the data will not remain together when sorted.

Sort by number Google Sheets - Inbuilt function

Step 2: Select Data > Sort range > Advanced range sorting options

In the Sort range options in the data tab we can access the advanced sorting options for range.

Sort by number Google Sheets - Accessing range sorting options

Note: We can also access the advance range sorting options by right clicking our highlighted data and selecting View more cell actions > Sort range

Sort by number Google Sheets - Accessing range sorting options alternative

Step 3: Select range sorting parameters

A pop up window will appear with several options:

Data has header row: If your highlighted data includes a header remember to check this box

Sort by: This option will display the columns in your highlighted data, If you have checked the data header box the column information will change to your header information. Column C contains our number information but we have a header and checked the box, this now shows as “Staff Number”

A-Z or Z-A: The two radio buttons represent the order direction, as we want our data to be in ascending order we will select A-Z

Add another sort column: This option can be used to add additional columns to includet

Sort by number Google Sheets - Advanced range sorting options

Step 4: Click Sort

Click on Sort and the information will be ordered as per your chosen parameters, in our example, the staff number data now appears in ascending order with the correct staff name next to it

Sort by number Google Sheets - Inbuilt-feature: Results

Example 2 - Sort Numbers using a Filter

In this example we will use our example dataset of staff members and their staff numbers. To demonstrate how to sort number data in an descending order (Z-A). Will now order the numerical data by using a filter.

Step 1: Highlight the data in your set to be included in the range

Drag to highlight the range of information in your dataset

Step 2: Select Data > Create a filter

Sort by number Google Sheets - Inbuilt-feature: Filter

Once this is selected we will see the filter symbol appear at the top of our data:

Sort by number Google Sheets - Inbuilt-feature: Filter symbol

Step 3: Select the filter symbol next to your chosen column

For our example we need to select the filter symbol to the right of our Staff Number column, this will present the filter options:

Sort by number Google Sheets - Inbuilt-feature: Filter options

Step 4: Select Sort Z-A to view results

In the options displayed we need to select Sort Z-A, once completed our data is arrange in a descending order with the largest number at the top and lowest at the bottom

Sort by number Google Sheets - Inbuilt-feature: Filter results

Sort Numbers in Google Sheets using the SORT Function

The SORT function in Google Sheets allows a high level of precision within our data. You can read our full SORT tutorial below:

Google Sheets Sort Function

SORT Function Syntax

The syntax for the SORT function is written as:

=SORT(RANGE,Column,is_ascending)

Syntax Breakdown:

=SORT: We must first write this to declare the sort intention in Google Sheets

RANGE: The range of information that is to be included in the function

Column: This is the column number identifier for the data we wish to be ordered. Column IDs are arranged from left to right and start at 1

Is_ascending: This is either a TRUE or FALSE value and declares the order direction:

TRUE

Ascending order (A-Z)

FALSE

Descending order (Z-A)

Syntax Example:

=SORT(A1:B20,2,True)

This example would specify that the range of data is to include all cells from A1 to B20, column 2 (which would be Column B in this example) would be the column sorted and true declares the data will be ascending.

Example - Using the SORT function

We will use the example dataset of Staff Name and Staff number, we will now use the SORT function in a formula to arrange the numerical data in an ascending order.

Step 1: Select an empty cell next to the data set

Ensure there is adequate room for the new list to populate

Step 2: Input the SORT formula

The formula for this example would be

=SORT(B3:C22,2,true)

This declares that the range of data is to include all cells from B3 to C22, column 2 (which would be Column C in this example) is the column to sort by and true declares the data will be ascending.

Sort by number Google Sheets - SORT function

Step 3: Press enter to see the displayed results

A new list is now populated with the numerical data arranged in an ascending (A-Z) order.

Sort by number Google Sheets - SORT function: Results

 

If you enjoyed this article, you might also like our article on how to sort on Google Sheets or our article on how to sort multiple columns in Google Sheets. 

If you want to learn how to sort rows by color in Google Sheets or how to set up Google Sheets email validation, 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 ->