In this article:

How to Sort by Number in Google Sheets [Best Method in 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

Use our bill approval software to easily set up bill approvals from your spreadsheet in just a few clicks. 

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. 

Schedule a free automation consult
Learn more

Automate repetitive tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Trigger
Action
Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
ADDCALENDAREVENT
Creates a one- or multiple-day calendar event with optional attendees
ADDHUBSPOT
Adds an object to Hubspot
ADDSLACKCHANNEL
Create a Slack channel, and optionally add a topic or members
CALLURL
Makes any HTTP request
CREATEGOOGLEDOC
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
CREATEPDF
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
FETCH
Makes any HTTP request and returns the response
INSERTROWS
Inserts given array below defined values in given worksheet
SENDGMAIL
Sends an email using your Google account
SENDOUTLOOK
Sends an email using your Microsoft Outlook account
SENDSLACK
Sends a Slack message
SENDSMS
Sends an SMS message using your Twilio account
UPDATECELL
Updates cells with given values
UPDATEHUBSPOT
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started