# 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.

#### 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.

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

#### Step 3: Select range sorting parameters

A pop up window will appear with several options:

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

#### 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

### 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

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

#### 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:

#### 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 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:

### 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.

#### 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.

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