Featured Article

"Google Sheets Sort by Number: A Step-by-Step Guide for Efficient Data Organization"

Alan Jun 16, 2026

Mastering Google Sheets: Sorting by Number

How to Number Rows in Google Sheets (Add Serial Numbers)
How to Number Rows in Google Sheets (Add Serial Numbers)

Google Sheets, a powerful tool in the Google Drive suite, offers a multitude of features to help you manage and analyze data. One of its standout functions is the ability to sort data by numbers, which can be incredibly useful when dealing with large datasets. In this guide, we'll walk you through the process of sorting by numbers in Google Sheets, step by step.

Mastering the Art of Sort Range in Google Sheets - Teacher Tech with Alice Keeler
Mastering the Art of Sort Range in Google Sheets - Teacher Tech with Alice Keeler

Understanding Sorting in Google Sheets

Sorting in Google Sheets allows you to arrange data in ascending or descending order based on one or more columns. This can help you find specific data, identify trends, and make informed decisions. When sorting by numbers, you can sort integers, decimals, and even dates.

35+ Best Free Google Sheets Templates For 2026 | Tiller
35+ Best Free Google Sheets Templates For 2026 | Tiller

Sorting a Single Column by Numbers

Let's start with the basics: sorting a single column of numbers. Assume you have a column of sales figures (column B) and you want to sort them from highest to lowest.

Google Sheets gets macros | TechCrunch
Google Sheets gets macros | TechCrunch
  1. Select the data you want to sort. In this case, click on the first cell in column B and drag down to select all the sales figures.
  2. Click on "Data" in the menu, then "Sort A-Z" or "Sort Z-A". The default sort is A-Z (ascending), so click on "Sort Z-A" to sort the numbers in descending order.
  3. Google Sheets will sort the numbers in column B, with the highest number at the top.

Sorting by Numbers and Then by Another Column

Sometimes, you might want to sort by one column of numbers and then by another column. For example, you might want to sort sales figures by amount and then by date.

How to Use Google Sheets in Dark Mode (on Mobile & Desktop)
How to Use Google Sheets in Dark Mode (on Mobile & Desktop)
  1. Select the data you want to sort.
  2. Click on "Data" in the menu, then "Create a sort order".
  3. In the "Sort by" column, select "Amount". In the "Sort order" column, select "Z-A" to sort by the highest number first.
  4. Click on "Add another sort column". In the new row, select "Date" in the "Sort by" column and "A-Z" in the "Sort order" column to sort by date in ascending order.
  5. Click "Sort" to apply the sort order.

Sorting by Numbers with Custom Sort Orders

Google Sheets also allows you to create custom sort orders for numbers. This can be useful if you want to sort numbers in a specific order that doesn't follow the standard ascending or descending order.

Master the ODD & EVEN Formulas in Google Sheets: Step-by-Step Guide with Examples"
Master the ODD & EVEN Formulas in Google Sheets: Step-by-Step Guide with Examples"
  1. Select the data you want to sort.
  2. Click on "Data" in the menu, then "Create a sort order".
  3. In the "Sort by" column, select the column of numbers you want to sort.
  4. In the "Sort order" column, click on the three vertical dots (⋮) and select "Custom sort order".
  5. In the "Custom sort order" dialog box, enter the numbers in the order you want them to appear. For example, if you want to sort the numbers 1, 2, and 3 in the order 3, 1, 2, enter 3, 1, 2 in the dialog box.
  6. Click "Done", then "Sort" to apply the custom sort order.

Sorting by Numbers with Conditional Formatting

How to Sort Columns Like a Pro in Google Sheets
How to Sort Columns Like a Pro in Google Sheets
How to Use the SORTN Function in Google Sheets
How to Use the SORTN Function in Google Sheets
How to Make a Numbered List in Google Sheets
How to Make a Numbered List in Google Sheets
How to Sort By Date in Google Sheets
How to Sort By Date in Google Sheets
How to Create a Search Box Using Query in Google Sheets [2020]
How to Create a Search Box Using Query in Google Sheets [2020]
Tables in Google Sheets
Tables in Google Sheets
Eight More Google Sheets Tips to Save You Time  – TCEA TechNotes Blog
Eight More Google Sheets Tips to Save You Time  – TCEA TechNotes Blog
Habit Tracker Template - Track Your Habits with Google Sheets - FREE Template
Habit Tracker Template - Track Your Habits with Google Sheets - FREE Template
Handy Cheat Sheets – Microsoft Office | CustomGuide
Handy Cheat Sheets – Microsoft Office | CustomGuide
6 Crazy Google Sheets Formulas You Should Know
6 Crazy Google Sheets Formulas You Should Know
Filter Has Mismatched Range Sizes in Google Sheets
Filter Has Mismatched Range Sizes in Google Sheets
How to use Google Sheets: A beginner's guide | Zapier
How to use Google Sheets: A beginner's guide | Zapier
15 Aesthetic & Simple Google Sheets Budget Templates for 2026 | Financial Planner Collection
15 Aesthetic & Simple Google Sheets Budget Templates for 2026 | Financial Planner Collection
Google Sheets Checklists
Google Sheets Checklists
The Ultimate Google Sheets Keyboard Shortcut Cheat Sheet for Beginners & Pros
The Ultimate Google Sheets Keyboard Shortcut Cheat Sheet for Beginners & Pros
a printable spreadsheet is shown in the form of a sheet with numbers on it
a printable spreadsheet is shown in the form of a sheet with numbers on it
Create and Graph in Google Sheets
Create and Graph in Google Sheets
the google sheets has hidden gems you're not using on your webpages
the google sheets has hidden gems you're not using on your webpages

Conditional formatting in Google Sheets allows you to apply different formats to cells based on their values. You can also use it to sort numbers based on certain conditions. For example, you might want to sort sales figures into different categories based on their amounts.

  1. Select the data you want to sort.
  2. Click on "Format" in the menu, then "Conditional formatting".
  3. Under the 'Format cells if...' dropdown, select 'Custom formula is'.
  4. Enter the formula to determine the category for each number. For example, you might enter "=IF(B2>1000, 'High', IF(B2>500, 'Medium', 'Low'))" to categorize sales figures as 'High', 'Medium', or 'Low'.
  5. Choose the formatting you want to apply to each category.
  6. Click "Done", then "Sort" to sort the numbers based on the categories you've created.

Sorting by Numbers with Scripts

For more complex sorting tasks, you might want to use Google Apps Script, a JavaScript-based scripting language built into Google Sheets. With scripts, you can automate sorting tasks, sort by multiple columns with complex conditions, and more.

Here's a simple script that sorts a range of cells by their values in descending order:

function sortRange() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var range = sheet.getRange("B2:B10"); // Change this to the range you want to sort
  range.sort({ descending: true });
}

To use this script, click on "Extensions" in the menu, then "Apps Script". Delete any code in the "Code.gs" file and paste in the script above. Then, click on the disk icon to save the project, and click on the play icon to run the script.

Sorting by numbers in Google Sheets can help you make sense of large datasets and gain insights from your data. Whether you're sorting a single column of numbers or creating complex custom sort orders, Google Sheets offers a range of tools to help you get the job done. With a little practice, you'll be a sorting pro in no time.