How can I sort bars in a bar chart using Google Sheets?

To sort bars in a bar chart using Google Sheets, you can use the “Sort Range” feature. First, select the data range of your bar chart. Then, click on the “Data” tab and select “Sort Range” from the drop-down menu. A dialog box will appear where you can choose the column or row to sort by and in what order (ascending or descending). Select the appropriate options and click “Sort” to rearrange the bars in your bar chart. This feature allows you to quickly and easily organize your data in a meaningful way for better visualization and analysis.


Often you may want to sort the bars in a bar chart in Google Sheets in ascending or descending order. 

Fortunately this is easy to do using the SORT function in Google Sheets and the following example shows how to do so.

Example: How to Sort Bars in Bar Chart in Google Sheets

First, let’s create the following dataset that shows the total sales made in various regions for some company:

Next, let’s create a bar chart to visualize the total sales by region.

To do so, highlight the cell range A2:B7, then click the Insert tab along the top ribbon, then click Chart.

A bar chart will appear that shows the sales for each region in the exact order that they appear in the dataset:

If you would like to sort the bars from smallest to largest based on sales values then you can type the following formula into cell D2 to create a new dataset that is sorted:

=SORT(A2:B7, 2, TRUE)

Note: The argument 2 specifies that we’d like to sort by values in column 2 of the range and the argument TRUE specifies that we’d like to sort the values in ascending order.

Next, highlight the cell range D2:E7, then click the Insert tab along the top ribbon, then click Chart.

A bar chart will appear that shows the sales for each region and the bars will be sorted from smallest to largest:

Google Sheets sort bar chart

If you would instead like to sort the bars from largest to smallest based on sales values then you can type the following formula into cell D2 to create a new dataset that is sorted:

=SORT(A2:B7, 2, FALSE)

Note: The argument 2 specifies that we’d like to sort by values in column 2 of the range and the argument FALSE specifies that we’d like to sort the values in descending order.

Next, highlight the cell range D2:E7, then click the Insert tab along the top ribbon, then click Chart.

A bar chart will appear that shows the sales for each region and the bars will be sorted from largest to smallest:

Note: You can find the complete documentation for the SORT function in Google Sheets .

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

x