How to Sort an Excel Chart Axis Without Reordering Source Data
Question details
The user wants to sort the categories (axis) of an Excel chart alphabetically or in a specific order without altering the original source data table.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Creating a clustered or stacked bar chart where the axis order needs to be displayed alphabetically or numerically, but the original data table must remain in its current order for other dependencies.
- Observed behavior
- By default, Excel charts mirror the exact order of the source data range. Changing the chart's visual order usually requires sorting the source data directly, which can disrupt other linked charts, pivot tables, or reporting structures.
Check which version of Excel you are using. The easiest method requires a modern version (like Microsoft 365 or Excel 2021) that supports Dynamic Arrays and the SORT function; otherwise, you will need to use Power Query.
Create a Chart-Only Range Using the SORT Formula
This is the quickest method for users with modern Excel versions to generate a dynamically sorted range specifically for the chart without touching the original table.
The SORT function is a dynamic array formula that automatically spills the sorted results into adjacent cells. By pointing your chart to this new spilled range, the chart stays updated and sorted automatically while your original data remains perfectly intact.
Find an empty area in your current worksheet or open a new hidden worksheet to serve as the new chart data range.
Type `=SORT(A2:B10, 1, 1)` into the first cell, replacing 'A2:B10' with your actual source data range. The '1' indicates the column index to sort by, and the second '1' indicates ascending order (alphabetical).
Highlight the newly generated dynamic array, navigate to the 'Insert' tab on the ribbon, and select your desired chart type (such as a Clustered Bar Chart).

Generate a Sorted Range Using Power Query
Ideal for users on older versions of Excel (2016 or 2019) or those dealing with large, complex datasets where dynamic arrays are not available.
Easily Sort Chart Data and Visualize in WPS Spreadsheet
WPS Spreadsheet provides powerful data sorting, filtering, and charting tools. You can effortlessly manage secondary source ranges to create stunning visualizations without altering your raw tables, all within a familiar interface.
- 1. Open your dataset: Launch WPS Spreadsheet and open your existing workbook.
- 2. Create a sorted range: Use sorting formulas or copy your data to a new blank range and sort it alphabetically using the 'Data' tab tools.
- 3. Insert the chart: Select the newly sorted range, navigate to the 'Insert' tab, click on 'Chart', and select your preferred layout.

Frequently Asked Questions
Can I sort a Pivot Chart without changing the source data?
Yes, Pivot Charts have built-in sorting capabilities completely separate from the raw data. You can click on the axis field buttons directly within the Pivot Chart and choose to sort A to Z or Z to A without affecting the original dataset.
Why is my Excel bar chart axis in reverse alphabetical order?
Excel plots bar charts from bottom to top by default, which visually reverses the appearance of your worksheet data. To fix this, double-click the vertical axis to open the Format Axis pane, and check the box for 'Categories in reverse order'.
Will the chart update if I change the values in my original table?
Yes. If you use a formula (like SORT) or a Power Query connection to create the secondary chart range, any value changes made in the original source data will flow through to the sorted range and instantly update the chart.




