How to Order Data in Google Sheets

Cody Schneider••8 min read

Putting data in the right order is one of the most fundamental tasks you’ll perform in a spreadsheet. Whether you're alphabetizing a list of names, arranging sales figures from highest to lowest, or organizing tasks by date, sorting brings clarity to your data. This guide walks you through several methods for ordering data in Google Sheets, from simple one-click sorts to more advanced, dynamic functions.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

The Easiest Method: The Built-in 'Sort Range' Feature

For most day-to-day tasks, Google Sheets' built-in sorting tool is all you need. It’s quick, easy to use, and handles the most common sorting scenarios perfectly.

Simple Single-Column Sort

Let's say you have a simple list of products and you want to put them in alphabetical order.

  1. Select your data: Click and drag to highlight all the cells you want to sort. It's important to select the entire table - for example, both the 'Product Name' and 'Price' columns - to keep your rows intact. If you only sort the product name column, the prices won't move with them, and your data will get scrambled!
  2. Go to the menu: Navigate to Data > Sort range > Sort range by column A, A → Z. If you want a reverse alphabetical sorting, you'll select Sort range by column A, Z → A.
  3. Done! Google Sheets will instantly reorder the selected rows based on the contents of the first column you selected.

Sorting Data That Has A Header Row

Most data tables have a header row that labels each column (e.g., "First Name," "Last Name," "Email"). You don't want this row to be sorted along with your data. Google Sheets has a simple checkbox for this.

  1. Select your entire range: This time, make sure you include the header row in your selection.
  2. Open advanced sorting: Navigate to Data > Sort range > Advanced range sorting options.
  3. Check the box: A pop-up window will appear. The most important thing here is to check the box for “Data has header row.”
  4. Choose your column and order: The dropdown menu will now show your actual column names instead of just "Column A," "Column B," etc. Select the column you want to sort by and choose either A → Z (for text) or Z → A for descending order. Click Sort.

Your data will be perfectly sorted, and your header row will remain securely at the top where it belongs.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

How to Sort by Multiple Columns

Sometimes sorting by one column isn't enough. You might want to sort a list of employees by their department and then alphabetize them by last name within each department. This is called a multi-level or multi-column sort.

Let's use an example of sales data. We want to sort it first by Region (alphabetically) and then by Total Sales (from highest to lowest).

  1. Select your range and open advanced sorting: Highlight your full dataset (including the header) and navigate to Data > Sort range > Advanced range sorting options.
  2. Check the header row box: Just as before, immediately check the box for “Data has header row.”
  3. Set the first sorting rule: In the first dropdown menu under "Sort by," select "Region." Keep the order as A → Z to sort the regions alphabetically (Central, East, West).
  4. Add another sort column: Click the button that says “Add another sort column.” A second line of sorting options will appear.
  5. Set the second sorting rule: In this second rule, choose "Total Sales" from the dropdown. To sort from highest to lowest, select Z → A. Even though the labels say Z and A, this option works for numbers, sorting them from largest to smallest. "A → Z" on numbers would sort smallest to largest.
  6. Sort it: Click the "Sort" button. Your data will now be grouped by region, and within each region, the sales reps will be listed in order of their total sales from highest to lowest.

The Dynamic Way: Using the SORT Function

The ‘Sort Range’ feature permanently reorders your original data. But what if you want to create a sorted view of your data without touching the original arrangement? This is perfect for dashboards and reports where you need the source data to remain in a specific order.

For this, you use the SORT function. It creates a new, sorted view in a new area of your sheet that will continue to update automatically from the source.

SORT Function Syntax

The formula looks like this:

=SORT(range, sort_column, is_ascending)

  • range: The group of cells you want to sort (e.g., A2:D50).
  • sort_column: The column you want to sort by. You can either use the column index (1 for the first column in your range, 2 for the second, etc.) or specify the full column range (e.g., B2:B50). Using the index is often easier.
  • is_ascending: Use TRUE for ascending order (A-Z, 1-100) and FALSE for descending order (Z-A, 100-1).

Example: Simple SORT

Imagine your raw sales data lives in the range A2:C10. To create a new table ordered by sales rep's first names (the second column in this range) alphabetically, you'd go to an empty cell (e.g., E2) and type:

=SORT(A2:C10, 2, TRUE)

Hit Enter, and Google Sheets will create a duplicate, sorted version of your table starting in cell E2. The original data in A2:C10 remains untouched. If you add data to columns A-C, the results of this formula will update in columns E, F, G automatically.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Example: Multi-Column SORT

You can also use the SORT function for multi-level sorting. Just add another set of sort_column and is_ascending arguments for each column that you want to sort by to the end of the formula.

To recreate our earlier example - sorting by Region (column B, or the 2nd column) ascending, then by Total Sales (column C, or the 3rd column) descending - you would use this formula:

=SORT(A2:C10, 2, TRUE, 3, FALSE)

Handling Custom Sort Orders

What happens when A-Z sorting doesn't cut it? For example, you want to sort something through priority ('High', 'Medium', 'Low') order or shirt sizes ("Small," "Medium," "Large," "X-Large"), alphabetical sorting would make this Small > Medium and High > Low.

Google Sheets doesn't have a direct "custom list" sorter (a helpful feature in Microsoft Excel). But don't worry, we can use helper columns and a quick formula. The logic is simple: We create our special order with assigned numerical representation. Then we tell Google Sheets through VLOOKUP for each line item, and we have our list where sorting can take place with the helper column rather than text-based ones.

Step-by-Step Guide to Custom Sorting:

  1. First, build a reference table. You have it on the 'CustomSortList' sheet with two columns: Column A is 'Priority', and Column B holds values that help the sheets understand them correctly (i.e., 'High' = 1, 'Medium' = 2, 'Low' = 3).
  2. Create a helper column: On your existing data sheet, create a new column before the column named 'Priority' as "Helper."
  3. Apply VLOOKUP: On each cell below "Helper," use the formula: =VLOOKUP(B2, 'CustomSortList'!A$2:B$4, 2, FALSE), where:
  4. Drag down the formula so that the entire dataset column gets populated with these values.
  5. Perform a simple A→Z sort on your helper column, and it will automatically follow the custom sorting we provided. You can hide the helper column from view if needed.

Common Issues and Best Practices

Sorting is easy, but a few common mistakes can lead to major headaches. Here are a couple of things to look out for.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

⚠️ Pitfall #1: Sorting Just One Column

The cardinal sin of spreadsheet sorting is highlighting and sorting a single column within a larger table. For example, if you sort only the 'Email' column, the names and phone numbers associated with those emails won't move, scrambling your contact list permanently. Always select your entire data range before sorting.

💡 Best Practice #1: Create Filters

If you're working in a shared sheet, it's recommended not to sort any data directly because your sort will affect what everybody working on will also see. Instead, use filters: Head over to Data, then Filter views, and choose Create new view. Name the filter 'My Sorted View', and use the dropdown on the column headers to sort only on your screen. Other users won't be affected, and you're free to arrange your data as you please!

Final Thoughts

Sorting in Google Sheets is more versatile than most people realize. From simple A→Z lists to multi-column arrangements and the dynamic power of the SORT function, these techniques can help you turn a messy dataset into a clear, actionable table.

While sorting and analyzing data within Google Sheets is great for simple lists or single data sources, your business data is likely spread across platforms like Shopify, Google Analytics, and your CRM. Pulling it all into a single sheet to analyze can quickly become a manual data drag. We've built Graphed to fix that by automating all your cross-platform reporting. You can instantly connect your sources and create live dashboards using just plain English - no formulas, no CSVs, no copy-pasting required.

Related Articles