Excel Stacked Bar Chart: Flip Category and Series Order

Charts & pivot tables · Updated November 19, 2026

To flip the order of the bars in an Excel stacked bar chart, right-click the vertical category axis, choose Format Axis, then turn on Categories in reverse order. To flip the segments within each bar, use Chart Design > Select Data and move the series up or down; these are separate changes, so choose the one that matches what you want to reverse.

Two different orders in a stacked bar chart

A stacked bar chart has categories and data series, and Excel orders each in a different way. Categories are the labels down the vertical axis: they might be products, months, regions, or people. Series are the values stacked across each bar: for example, a product’s sales by channel or a month’s hours by task type.

For example, suppose the category labels are North, Central, and South, and each bar contains Online, Store, and Wholesale segments. Reversing the category order changes which region appears at the top and bottom. Reordering the series changes the arrangement of the three segments inside every region’s bar. Neither operation changes the underlying values.

  • Want the first category at the top? Reverse the category axis.
  • Want a different segment nearest the left edge? Change the series order.
  • Want to change both? Apply both settings, then check the axis, legend, and labels.

This distinction explains why sorting the worksheet or changing the chart’s axis setting may not produce the result expected: sorting categories does not necessarily rearrange the stack segments.

Reverse the category order

In Excel for Microsoft 365 on Windows, use the vertical axis labels to reverse the sequence of bars:

  1. Select the chart, then right-click one of the category labels along its vertical axis.
  2. Choose Format Axis. The Format Axis pane opens.
  3. Under Axis Options, select Categories in reverse order.

The categories will display in the opposite top-to-bottom order. If the source table lists January, February, and March, for example, the chart may change from January at the top to March at the top. The data values and the order of the series within each bar remain the same.

On a Mac, the corresponding workflow is to select or Control-click the category axis, open Format Axis, and select Categories in reverse order in Axis Options. The pane’s placement and appearance can differ by Excel release, but the setting is the same. Excel for the web may expose fewer chart-formatting controls than the desktop app; if the option is unavailable, open the workbook in desktop Excel.

Keep the value axis in a useful position

After reversing category order, Excel may move the horizontal value axis from the bottom of the plot area to the top. This is a side effect of the category-axis setting, not a change to the data. It can be awkward when the chart has a horizontal gridline or axis labels at the top, particularly if the chart is small.

To place the value axis back at the bottom, select the vertical category axis and open Format Axis. Under Axis Options, find Horizontal axis crosses and choose At maximum category. The wording describes where the horizontal axis crosses the category scale; after reversing the categories, the maximum category is at the opposite end of the displayed sequence. Check the finished chart because the best setting depends on the chart’s orientation and data.

Do not confuse this crossing setting with the value-axis scale. It changes where the axis appears, not the minimum, maximum, or plotted totals. If the axis is still misplaced, confirm that you have formatted the category axis rather than the value axis.

Change the order of the stacked segments

To change which series is first in the stack, edit the chart’s series order. In Excel for Microsoft 365 on Windows:

  1. Select the chart.
  2. Go to Chart Design > Select Data.
  3. In Legend Entries (Series), select the series you want to move.
  4. Use the up or down arrow buttons to change its position, then choose OK.

For a horizontal stacked bar, the series order determines the sequence of segments along the bar, starting from the zero end. If the current order is Online, Store, Wholesale, moving Wholesale to the top of the series list makes it the first plotted segment, nearest the left side for a typical positive-value chart. The next series stacks beside it, then the next. If you are unsure which direction Excel will use, move one series and inspect the chart before making additional changes.

Changing this order can also change the order in which series appear in the legend. Review the legend after editing: it should still help readers match each color to its segment. The Select Data dialog is available on Mac as well, though the dialog’s layout may differ slightly.

Check how the chart reads its source data

Excel builds a chart from a selected data range, using one dimension for categories and another for series. A typical table might put region names in the first column, channel names across the first row, and numeric values in the body. The first column supplies the bar categories, while each channel becomes a series in the stack.

If Excel has interpreted rows and columns the wrong way, the chart may have unexpected labels or too many bars. Select the chart and use Chart Design > Switch Row/Column to swap which dimension supplies the series and categories. This changes the chart’s data orientation; it is not merely a reverse-order command. Use it when the series and category roles are wrong, not simply because you want the bars displayed bottom-to-top in a different sequence.

You can also check Chart Design > Select Data to review the chart data range, category-axis labels, and series names. If you add a new category or series to the worksheet, make sure the chart’s source range includes it. A chart cannot display a category or segment that is outside its plotted range.

Why sorting the worksheet may not be enough

Sorting the source rows can change the order of the category bars, but it does not control the order of the series segments. If you reverse the source category rows and also enable Categories in reverse order, you may effectively reverse the visible sequence twice, putting the original first category back where it started. Decide whether the worksheet’s row order or the chart’s axis setting should control the display, then use one method consistently.

Series order is separate again. If the stack should run from a particular segment at the left to another at the right, change the series sequence in Select Data. Rearranging the columns in the worksheet can also affect series order when the chart is linked to that layout, but using the Select Data controls makes the intended chart order easier to see and adjust.

These settings affect the chart presentation; they do not reorder or rewrite the source records. That is useful when you want a presentation-specific order without changing a worksheet used for other analyses.

Common problems and quick checks

  • The wrong direction changed: You may have selected the vertical category axis when you meant to reorder series, or vice versa. Category order changes whole bars; series order changes segments within each bar.
  • The horizontal axis moved to the top: Set Horizontal axis crosses to At maximum category in the category-axis options, then inspect the result.
  • The legend no longer reads in the desired sequence: Check the series order in Select Data and decide whether the legend should follow that order. The legend represents series, not category order.
  • The bars look reversed but the colors seem unchanged: Reversing categories does not change series colors. A segment’s color is generally associated with its series, so it should retain that color when its category position changes.
  • The values appear to grow in an unexpected direction: Check whether the chart contains negative values. Negative and positive values can extend on opposite sides of the zero baseline, so the visual sequence may not resemble an all-positive stack.
  • Labels or totals overlap: Reversing order does not automatically improve label placement. Review data labels, axis labels, and available chart space after the change.

For a useful final check, compare one bar with its source row. Confirm the category name, the order and colors of its segments, and the total or scale. This catches a common mistake: changing the orientation of the data when only the display order needed to change.

Choosing between stacked bar and stacked column

A stacked bar chart uses horizontal bars, which can make long category names easier to read and is often useful when comparing a moderate number of categories. A stacked column chart uses vertical columns. It has the same basic distinction between category order and series order, but its category axis is horizontal and the series stack vertically from the baseline.

For a stacked column, the category-order control is associated with the horizontal category axis, so do not follow the bar-chart instruction to right-click the vertical category labels. Select the category axis that actually contains the category names. Series order is still managed through Chart Design > Select Data. A 100% stacked bar or column uses the same order controls, but scales each category to 100 percent; it shows proportions rather than the original totals.

If readers need to compare the exact value of every segment across categories, a stacked chart can make that difficult because only the first segment shares a common baseline. A clustered bar chart or a table may communicate individual values more clearly. Keep a stacked chart when the combined total and part-to-whole composition matter, and use consistent series order and color to make comparisons easier.

Frequently Asked Questions

How do I make the first bar appear at the top in Excel?
Right-click the vertical category axis, choose Format Axis, and select Categories in reverse order. If the horizontal axis moves to the top, set Horizontal axis crosses to At maximum category.

How do I reverse the order of segments in a stacked bar chart?
Choose Chart Design > Select Data, select a series under Legend Entries (Series), and use the up or down arrow buttons. The series sequence controls the order of the stacked segments.

Does reversing the category axis change the data?
No. It changes the display order of the category bars. It does not edit worksheet values, change totals, or reorder the series within each bar.

Why did my legend order change when I rearranged the stack?
The legend lists the chart’s series, so changing series order can change how those entries are arranged. Review the legend after moving series and make sure each label still matches its color.

Can I reverse only one category’s segments?
Not with the chart-wide series-order setting: it applies to the series across the chart. If one category needs a different visual treatment, consider whether a separate chart or a carefully designed data layout would make the comparison clearer without implying that the series order changes by category.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.