To rearrange a stacked bar chart in Excel, you change the order either of the series (the coloured segments inside each bar) or of the categories (the bars themselves). Series order is controlled from Chart Design > Select Data using the up and down arrows in the Legend Entries list. Category order is controlled by sorting the source data, or by reversing the axis under Format Axis > Axis Options. Both changes redraw the chart instantly, so you can experiment freely without rebuilding anything. Labels and menu names can differ slightly depending on your Excel version, platform and region, but the logic is the same on Windows, Mac and Excel for the web.

What You'll Need

  • An existing stacked bar or stacked column chart in Excel, with its source data on the same workbook.
  • Access to the data range, because the easiest reordering methods work through the source cells.
  • A chart type that is actually stacked: Stacked Bar, Stacked Column or one of the 100% stacked variants. Clustered charts have no stacking order to change.

Step-by-Step

Rearrange the stacked segments (series order)

This is what most people mean: which segment sits at the base of each bar and which sits on top (or, for horizontal bars, at the left and right).

  1. Click the chart once so the chart tools appear on the ribbon.
  2. Go to Chart Design (called Design in some versions) and click Select Data.
  3. In the dialog, look at the Legend Entries (Series) list on the left. Each entry is one segment of your stacked bar.
  4. Select a series and use the small up and down arrow buttons beside the list to move it. Moving a series to the top of the list places it at the bottom of the stack on a vertical column chart, and at the left of a horizontal stacked bar.
  5. Repeat until the segments are in the order you want, then click OK. The chart updates as soon as you confirm.

An alternative that does not touch the dialog: right-click the chart, choose Select Data from the context menu, then follow the same arrow steps. You can also drag the plotted segments in the sheet's data range, because chart series follow the column or row order of the range.

Rearrange the bars themselves (category order)

  1. Decide the order you want: alphabetical, by total value, by a segment's value, or simply reversed.
  2. Sort the underlying data. Select the whole data table including the category labels, then use Data > Sort and pick the column to sort by. Avoid sorting only the value column, because that detaches labels from their numbers and scrambles the chart.
  3. If you only want to flip the chart without changing the sheet, right-click the category axis and choose Format Axis.
  4. In the pane that opens, find Axis Options and tick Categories in reverse order. For a horizontal bar chart this flips the bars top to bottom; for a column chart it flips left to right.
  5. If reversing moves the value axis to the top or right and you want it back at the bottom or left, look for the option that controls where the axis crosses and set it to the maximum category, or simply leave it if the layout looks fine.

Use a helper column for a custom order

  1. Add a numeric column to your table called something like Order, and number the categories in the sequence you want (1, 2, 3 and so on).
  2. Sort the table ascending by that Order column. The chart follows the new row order automatically.
  3. Keep the helper column outside the chart's plotted range so it does not appear as an extra series. If Excel does pull it in, use Select Data and remove it from the Legend Entries list.

Common Mistakes

  • Sorting the value column alone. This shuffles numbers away from their labels, so bars appear to represent the wrong categories. Always include the label column in the sort range.
  • Editing the chart instead of the data. Deleting or dragging segments on the chart surface does not reorder anything; it just selects them.
  • Confusing series order with category order. Series order changes which colour is on the bottom of each stack. Category order changes which bar appears first.
  • Reversing the axis when the legend is also reversed. Reversing categories can make the legend look out of step with the bars. Reorder the series instead if the mismatch is confusing.
  • Breaking the chart by moving cells. Cutting and pasting cells can leave the chart pointing at an old range. Check Select Data after any structural edits.
  • Leaving a blank series in the legend. An empty row in the range often shows up as a nameless legend entry and an invisible segment. Remove it from the chart's series list.

Tips

  • Stack the largest or most important segment at the base of each bar so it anchors the reader's eye, and keep that order consistent across every chart in a report.
  • Put segments in a logical order rather than a random one: chronological for time-based categories, largest to smallest for totals, or the same order as a related table in the document.
  • For 100% stacked charts, order segments by average share so the visual weight reads correctly.
  • Use Switch Row/Column on the Chart Design tab if your series and categories are the wrong way round after reordering.
  • Duplicate the sheet before a big reorder if the chart is part of a finished report, so you can roll back without redoing formatting.
  • Name your data range as an Excel Table (Insert > Table). The chart then follows sorts and additions without you relinking anything.

Troubleshooting

The chart will not update after sorting. The chart may be linked to a fixed range rather than the table. Click the chart and check the highlighted range on the sheet; if rows outside it changed, use Select Data to reset the range, or convert the data to a Table so the reference expands.

The up and down arrows are greyed out. This usually means the chart is an embedded PivotChart or is linked to a data model. For a PivotChart, reorder the field in the PivotTable field list instead, since the chart mirrors the pivot layout.

The legend order no longer matches the bars. Excel stacks series in reverse of the legend list in some chart types. Either accept the mapping or flip the category axis to bring them into line.

A segment disappeared after reordering. The series may be plotting empty cells. Check whether hidden rows or zeros are set to show as gaps under the chart's Select Data > Hidden and Empty Cells options.

The chart looks the same after reversing the axis. Make sure you changed Categories in reverse order on the axis itself, not the values axis, and that no manual category sort is overriding it.

Frequently Asked Questions

Can I drag segments to reorder them directly on the chart?

No. Excel does not support dragging segments to reorder a stacked series. Use Select Data and the arrow buttons, or reorder the source data.

How do I put a specific series at the bottom of the stack?

Move it to the top of the Legend Entries list in the Select Data dialog. On column charts this places it at the base of the stack.

Will reordering the chart change my worksheet data?

Only if you sort the cells. Using Select Data or Format Axis changes the chart display and leaves the sheet untouched.

Why does my stacked chart show bars in a different order from my table?

The category axis is probably set to reverse order, or the chart is pointing at a different range than you think. Check both.

Does this work in Excel for the web and on Mac?

Yes, the same Select Data and Format Axis options exist there, though the ribbon wording and button placement can vary slightly by version.