To sort an Excel chart, sort the chart’s source data: select a cell in the data, choose Data > Sort, pick the column and order, then select OK. The chart normally updates to match the new row order. If you want to change the order shown without disturbing the original list, make a separately sorted helper range and chart that instead.
How sorting a chart works
An Excel chart usually reflects the order of the cells in its source range. For example, if a chart uses a list of regions and sales totals, its categories follow the region rows in the worksheet. Sorting those rows by sales changes the sequence of the plotted categories; sorting the whole range keeps each region paired with its correct sales figure.
This distinction matters because a chart does not generally have a separate command that sorts its plotted points by value while leaving the source untouched. A chart is a view of the data, not a replacement for the worksheet’s row order. The most dependable way to get a chart in descending or ascending value order is therefore to sort the source rows, or provide the chart with a second range that is already sorted.
Before changing the order, check what the chart uses as its source. Select the chart and choose Chart Design > Select Data, or right-click the chart and choose Select Data. The dialog shows the data series and the category-label range. This is useful when a chart draws from several columns, a non-adjacent range, or a different worksheet than the one currently open.
Sort the source data by a chart value
Suppose a worksheet has Region in column A and Sales in column B, with a header row and five records. To show the highest sales first, sort the complete set of records by Sales from largest to smallest:
- Click a cell inside the data. If the records are in a formal Excel table, click anywhere in the table.
- On the ribbon, choose Data > Sort. In the Sort dialog, confirm that My data has headers is selected if the first row contains column names.
- Set Sort by to Sales, Sort On to Cell Values, and Order to Largest to Smallest. Choose Smallest to Largest for the reverse order.
- Select OK and check that every region moved together with its sales value. The chart should redraw in the resulting row order.
Sorting the full records is essential. If you select only the numbers and sort them, the labels may no longer match the values, producing a chart that looks plausible but tells the wrong story. Excel often offers to expand a selection when it detects neighboring data. Choose the option that expands the selection so related columns stay together.
For a quick one-column sort, the filter arrows on a table header can also sort values ascending or descending. A table is often convenient for chart data because its rows remain a clearly defined set as records are added. Still, review the chart after adding records: its source range must include the new rows for them to appear.
Choose the sort order and handle ties
Choose an order that supports the point you want the chart to make. Descending values put the largest result first, which is useful for rankings. Ascending values can make small values or the lowest-performing items easier to find. Alphabetical order may be preferable when readers need to locate a known category rather than compare magnitudes.
Excel’s Sort dialog can apply more than one level. For example, you could sort first by Department in alphabetical order and then by Sales from largest to smallest within each department. In Data > Sort, choose Add Level to specify the next column and order. This produces grouped results rather than one overall ranking, so use it only when that grouping is meaningful for the chart.
When multiple rows have the same value, add a secondary sort key if a consistent tie order matters. For instance, sort by Sales descending and then by Region A to Z. Without a secondary key, equal values do not express a deliberate alphabetical tie-break. A chart may display equal-height bars, but their positions can still affect how easily readers scan the categories.
Reorder series and category labels separately
A chart can have two different kinds of order. Categories are the labels along the horizontal axis in many column charts, or along the vertical axis in bar charts. Series are the separate data sets, often shown as differently colored bars or as entries in a legend. Sorting worksheet rows changes category order, while series order can be adjusted in the chart’s data settings.
To reorder series, select the chart, choose Chart Design > Select Data, select a series under Legend Entries (Series), and use the up or down controls to change its position. This changes the series sequence in the chart and legend without sorting the worksheet rows. Depending on the chart type, series order can also affect which series is drawn in front or behind another.
For a category order based on values, sort the source rows or use a helper range. The Select Data dialog lets you edit which cells provide the category labels, but it is not a general-purpose tool for dragging individual categories into a new order. If labels are in the wrong sequence, inspect the label range and the row order in the source.
Reverse the category direction in a bar chart
Sometimes the data is correctly sorted, but a horizontal bar chart places the first category at the bottom rather than at the top. This is an axis-display issue, not a failed sort. Right-click the category axis, choose Format Axis, and under Axis Options select Categories in reverse order. The categories then appear in the opposite vertical direction.
Reversing the categories can make the largest bar appear at the top when the data is sorted largest to smallest. It does not rearrange the worksheet rows or change the values. In some bar charts, reversing the category axis also changes where the value axis crosses the chart. If the value axis moves to an unexpected side, check the axis-crossing options in the Format Axis pane and adjust them for the intended layout.
Column charts have categories along the horizontal axis, so the same reverse-category setting changes left-to-right order rather than top-to-bottom order. If the goal is simply to rank the results from high to low, sorting the source is usually clearer than reversing the axis alone.
Keep the original data with a sorted helper range
A helper range is useful when the worksheet must retain its original order, such as a chronological log, while the chart needs a ranking. Put the sorted results in a separate area and set the chart’s source to that area. In Microsoft 365 or Excel 2021, the SORT function can generate a sorted copy.
For example, with headers in A1:B1 and regions in A2:A6 and sales in B2:B6, enter this in an empty cell outside the source data to sort the records by the second column in descending order: =SORT(A2:B6,2,-1). Given North 120, South 85, East 160, West 110, and Central 95, the returned rows are East 160, North 120, West 110, Central 95, and South 85. The formula leaves the original range in place.
The number 2 tells SORT to order by the second column of the specified range; -1 means descending, while 1 means ascending. The formula returns a dynamic array, so the results spill into neighboring cells. Leave that spill area empty. To chart the results, select the helper output and insert a chart, or update the existing chart’s source range through Chart Design > Select Data. If the data grows, confirm that the helper formula’s input range and the chart’s plotted range cover the added records.
In older Excel versions that do not have SORT, create a copied range and use Data > Sort on the copy, or use a PivotTable or another suitable method. Do not assume that a formula or chart feature is available in every Excel edition; SORT requires Excel 2021 or Microsoft 365.
PivotCharts and other chart types
A PivotChart is controlled by its associated PivotTable, so arrange the PivotTable fields and sort its labels or values to change the chart’s order. For example, select a value in the PivotTable and use the available sort options to sort the associated items by that value. Refresh the PivotTable when its underlying source data changes. A PivotChart may not behave like a standard chart because its categories and series are managed by PivotTable fields.
For a regular chart, the same source-order principle applies to column, bar, line, and pie charts, though the visual effect differs. A line chart’s sequence can imply time or progression, so sorting dates numerically is usually more meaningful than sorting the measured values. A pie chart follows the source order of its slices; sorting its source can make the slices easier to compare, but it does not turn the chart into a ranked bar chart. For precise comparisons across many categories, a sorted bar chart is often easier to read.
Common sorting problems and fixes
- Labels and values no longer match: Undo the sort immediately if possible, then sort the entire data range rather than one column. Check the resulting rows against the original records.
- The chart did not change: Use Chart Design > Select Data to verify the chart’s source range. The chart may use a different range, a fixed range that excludes new rows, or a PivotTable that needs refreshing.
- Numbers sort strangely: Some values may be stored as text. Check for leading apostrophes, inconsistent spaces, or mixed data types, convert the entries consistently, and sort again. Text that looks numeric is not always ordered as a number.
- Dates appear out of order: Check whether the cells contain real Excel dates rather than text that only looks like a date. Use a consistent date format and sort by the date values.
- Blank rows split the range: Blank rows or columns can make it less clear which cells belong to the data. Keep each record in a continuous range, with one header row and no merged cells in the data area.
- Totals appear among the categories: Exclude a grand-total row from a standard chart’s source unless it is intentionally part of the comparison. In a table, keep summaries outside the record rows where possible.
After sorting, inspect the chart title, axis labels, and legend as well as the bars or points. A correct sort can still be confusing if the axis scale obscures differences, if category names are cut off, or if a series is mistaken for a category. Sorting improves order; it does not by itself guarantee a clear chart.
Frequently Asked Questions
Can I sort an Excel chart without sorting the original data?
Yes. Create a separate helper range, sort a copy of the data, or use SORT in Excel 2021 or Microsoft 365, then point the chart to that range. The original records remain in their existing order.
How do I sort an Excel chart from largest to smallest?
Sort the complete source range by the chart’s numeric value column using Data > Sort and Largest to Smallest. The chart will generally follow the changed row order.
Why does my bar chart show the largest category at the bottom?
The category axis may display its first item at the bottom. Right-click that axis, choose Format Axis, and select Categories in reverse order under Axis Options.
Can I sort only the legend entries?
Yes. Open Chart Design > Select Data, choose a series under Legend Entries (Series), and use the up or down controls. This changes series order, not the order of category rows in the worksheet.
Does sorting a PivotChart work the same way?
No. Sort the associated PivotTable or its field items, and refresh the PivotTable if the source data has changed. The PivotTable controls the PivotChart’s categories and series.
Related
- How to Insert a Line Above a Table in Word
- How to Insert a Functioning Checkbox in Microsoft Word
- How to Insert a Gray Line in Word: Shapes and Borders
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Line Chart Rising Line: How to Remove ItTo remove a rising line in an Excel line chart, first identify what the line represents: select the…
- Excel Chart Legend Not Showing All Labels?If an Excel chart legend is missing labels, first check what the chart treats as a legend entry:…
- Google Sheets Chart Trendlines: Add and Customize OneTo add a trendline in Google Sheets, open the chart editor by double-clicking your chart, choose Customize >…
- Google Sheets Chart With Two Y-Axes: Setup and TipsYes. In Google Sheets, you can put one data series on a second, right-side y-axis: open the chart…
- Half-Circle Charts in Excel: Create a Semi-DoughnutExcel does not have a dedicated half-circle chart button, but you can make one with a doughnut chart:…
- Google Sheets Pivot Tables: Combine Multiple SheetsGoogle Sheets pivot tables use one source range, so they cannot directly summarize separate tabs as independent sources.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.