How to Sort Bar Chart in Google Sheets
Sorting the bars in your Google Sheets chart from highest to lowest is a small tweak that makes a huge impact on readability. Instead of forcing viewers to hunt for the biggest or smallest values, a sorted chart presents a clear story instantly. This guide will walk you through the simple methods to organize your bar charts effectively.
Why Bother Sorting Your Bar Chart?
An unsorted bar chart is like a list of random facts - all the information is there, but there’s no narrative. Sorting your chart transforms it from a data jumble into a clear, professional visual. Think about it:
- It tells a story: When you sort a chart showing your monthly sales figures, the viewer immediately sees your best and worst months. A report on website traffic sources instantly reveals your most effective marketing channels without any mental gymnastics.
- It looks professional: A sorted, organized chart feels intentional and polished. It shows you’ve taken the time to present your data in the most digestible way possible, which builds trust with your audience.
- It highlights key insights: The most important insights often live at the extremes - the top performer, the lowest-cost campaign, or the least-viewed product page. Sorting brings these critical data points to the forefront, making them impossible to miss.
Simply put, sorting is the easiest way to add clarity and impact to your data visualizations.
The Golden Rule: Sort the Source Data, Not the Chart
This is the most important concept to understand: you can't directly sort the bars within the chart editor in Google Sheets. There is no "Sort Chart" button. Instead, your chart simply acts as a mirror that reflects the order of your source data.
To sort your chart, you must sort the data table first. Once you rearrange the rows in your table, the chart will automatically update to reflect that new order. This might seem like an extra step, but it actually gives you more control and ensures your data table and visualization are always in sync.
Method 1: Using the Built-in Sort Range Feature
The quickest way to sort your data and chart is with Google Sheets' native "Sort range" tool. This method directly modifies the order of your current data table. It's perfect for one-off analyses or situations where you're comfortable rearranging your original dataset.
Step 1: Set Up Your Data
First, make sure your data is organized in a clear, chart-friendly format. You need at least two columns: one for a category label (like "Traffic Source" or "Month") and one for a numeric value (like "Sessions" or "Sales"). Be sure to include headers for each column.
Let’s use this sample data showing website sessions by marketing channel:
Step 2: Create Your Bar Chart
Highlight your data table, including the headers (in our example, A1:B6). Then, navigate to the top menu and click Insert > Chart. Google Sheets will likely default to a bar or column chart automatically. If not, you can easily change the chart type in the Chart editor that appears on the right.
Initially, your chart will appear unsorted, reflecting the original order of your data.
Step 3: Select Your Data to Sort
Now, go back to your data table. Click and drag to highlight the entire range you want to sort, including the header row. Highlighting the headers is important because it allows you to sort by the column name ("Sessions") instead of the column letter ("Column B"), which is more intuitive.
Step 4: Open the Advanced Sorting Options
With your data highlighted, navigate to the top menu and click Data > Sort range > Advanced range sorting options.
Quick Tip: Be careful not to use "Sort sheet," as that will try to sort the entire worksheet, which can mess up other data you have on the page. "Sort range" applies the action only to your selected cells.
Step 5: Configure Your Sort Settings
A dialog box will appear. Here’s how to configure it to sort your chart from highest to lowest:
- Check the Box: First, ensure the box next to “Data has header row” is checked. Because you included your headers in the selection, this tells Sheets to ignore that first row when sorting.
- Choose the Sort Column: In the “Sort by” dropdown, select the header of the column containing your numeric values. In our example, you’d choose "Sessions."
- Set the Sort Order: To arrange the bars from largest to smallest, you need a descending order. Click the button labeled “Z → A.” For ascending order (smallest to largest), you would choose “A → Z.”
After you’ve set these options, click the green “Sort” button.
Step 6: Review Your Sorted Chart
Instantly, two things will happen. Your data table will be reordered based on the "Sessions" column, from the highest value to the lowest. More importantly, your bar chart will automatically update to reflect this new order. Now, your bars will be perfectly arranged, making it immediately obvious that Organic Search is your top-performing channel.
Method 2: Using the SORT Function for Dynamic Sorting
What if you want to keep your original data table in its original order but still want a sorted chart? This is common in dashboards where the source data might be arranged chronologically or alphabetically for other purposes. The perfect solution here is the SORT function.
The SORT function is a dynamic formula that creates a new, sorted version of your data range in a separate location without altering the original. Your chart can then be based on this new, dynamically sorted table.
The Syntax
The formula looks like this:
=SORT(range, sort_column, is_ascending)
range: The data you want to sort (e.g., A1:B6).sort_column: The column number to sort by (1 for the first column, 2 for the second, etc.).is_ascending: UseTRUEfor ascending order (A-Z, smallest to largest) orFALSEfor descending order (Z-A, largest to smallest).
Step 1: Choose a New Location for Your Data
Find an empty space in your sheet where you want the new sorted table to live. For example, if your original data is in A1:B6, you could use cell D1.
Step 2: Enter the SORT Formula
In your chosen empty cell (e.g., D1), type the SORT formula referencing your source data. For our example, to sort by the Sessions column (the second column) in descending order, the formula would be:
=SORT(A1:B6, 2, FALSE)
As soon as you hit Enter, Google Sheets will populate the cells starting in D1 with a fully sorted version of your original table. Headers and all!
Step 3: Create a Chart from the New Sorted Data
Now, simply highlight your new, formula-driven table in columns D and E. Go to Insert > Chart. Your new chart will be sorted by default because it's based on data that is already sorted.
The best part? This setup is dynamic. If you update a number in your original table in column B, the SORT formula will automatically re-sort the new table, and your chart will update in real-time. This is incredibly powerful for building live dashboards.
Quick Tips for Smarter Chart Sorting
- Sorting multiple levels: The "Advanced range sorting options" menu allows you to add secondary sort rules. For example, you could sort by Sales (Z → A) first, then by Region (A → Z) to group ties alphabetically.
- Want to sort by labels instead? If you need to sort your chart alphabetically by label (e.g., Traffic Source from A-Z), just change your sort criteria. In Method 1, pick the "Traffic Source" column and "A → Z." In Method 2, use the formula
=SORT(A1:B6, 1, TRUE). - Handling horizontal bar charts: The process is exactly the same for both vertical column charts and horizontal bar charts. You sort the source data, and the chart's bars (whether vertical or horizontal) will reorder themselves.
- Keep an "Other" category at the bottom: Sometimes you have a generic "Other" category that should always be last, regardless of its value. The easiest way to handle this is to sort your data first using one of the methods above, then manually cut and paste the "Other" row to the bottom of the table. Your chart will update accordingly.
Final Thoughts
Mastering the ability to sort a bar chart in Google Sheets ultimately comes down to knowing how to sort your source data. Whether you use the quick and simple Sort Range tool or the more flexible and dynamic SORT function, you can make your charts more insightful, professional, and easier for anyone to understand.
While sorting charts in Google Sheets is a great skill, we found ourselves spending countless hours manually updating reports just like this one. That's why we built Graphed. It connects directly to your marketing and sales data sources - like Google Analytics, Shopify, and Salesforce - to automatically create beautifully organized, real-time dashboards for you. Instead of tweaking tables and sorting charts, you just ask a question in plain English, and it delivers the answer as a live, interactive visualization.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.