To rearrange the order of bars in an Excel bar chart, you must sort the source data in the spreadsheet or adjust the "Categories in reverse order" setting in the axis options. Because Excel plots data based on the order of the cells in your table, changing the sequence of the rows or columns directly updates the visual order of the bars in the chart.
What You'll Need
- An existing Excel workbook with a bar or column chart.
- The source data table used to generate the chart.
- Administrative access to edit the spreadsheet.
Step-by-Step
Depending on whether you want a specific logical order (like alphabetical) or a value-based order (like highest to lowest), choose one of the following methods. Note that menu labels may differ slightly depending on your version of Excel or operating system.
Method 1: Sorting the Source Data
This is the most common way to rearrange bars. If you sort your table, the chart follows suit.
- Click any cell within the column of data you want to sort (e.g., the "Sales" column or the "Category Name" column).
- Go to the Data tab on the top ribbon.
- In the Sort & Filter group, click Sort A to Z (Ascending) or Sort Z to A (Descending).
- Observe the chart; the bars will automatically shift to match the new order of the rows in your table.
Method 2: Reversing the Axis Order (For Horizontal Bar Charts)
In horizontal bar charts, Excel often plots the first row of data at the bottom of the chart, which can feel counterintuitive. To flip this without changing your table:
- Right-click on the Vertical Axis (the list of category names on the left side of the chart).
- Select Format Axis... from the context menu. This opens the Format Axis pane on the right side of the screen.
- Under the Axis Options tab (represented by a bar chart icon), scroll down to the Axis position section.
- Check the box labeled Categories in reverse order.
- The bars will now flip, placing the first item in your data table at the top of the chart.
Method 3: Manual Rearrangement
If you need a custom order that isn't alphabetical or numerical (e.g., "Low, Medium, High"):
- Go to your source data table.
- Select the entire row you wish to move by clicking the row number on the far left.
- Right-click the selected row and choose Cut (or press Ctrl+X).
- Right-click the row where you want to insert the data and select Insert Cut Cells.
- The chart will update instantly to reflect the manual move.
Common Mistakes
- Sorting only one column: If you select only one cell and sort without expanding the selection, you may decouple your labels from your values, resulting in a chart with incorrect data. Always ensure the entire data range is included in the sort.
- Confusing Column and Bar charts: Remember that "Column charts" are vertical and "Bar charts" are horizontal. The "Categories in reverse order" trick is specifically useful for horizontal bar charts.
- Ignoring Hidden Rows: If you hide rows in your data table, they usually disappear from the chart as well. If a bar is missing, check if the source row is hidden.
Tips
- Use Tables: Convert your data range into an official Excel Table (Insert > Table). When you sort a Table, the chart updates more reliably, and any new data added to the bottom of the table is automatically included in the chart.
- Helper Columns: If you have a complex custom order, create a "Helper Column" with numbers (1, 2, 3...). Sort by this helper column to get your bars in exactly the order you want, then hide the helper column from view.
- Dynamic Sorting: For advanced users, using the SORT function in a separate range can create a dynamic chart that rearranges itself automatically as data changes.
Troubleshooting
If the bars are not moving as expected, try these steps in order:
- Refresh the Data: If you are using a Pivot Chart, sorting the table won't work. You must right-click the chart and select Refresh, or sort the data directly within the PivotTable fields.
- Check Data Range: Right-click the chart and choose Select Data... Ensure the "Chart data range" box covers all the rows and columns you intend to sort.
- Verify Axis Settings: If the order is exactly the opposite of what you want, double-check the Categories in reverse order setting in the Format Axis pane.
- Check for Merged Cells: Merged cells in your source data can prevent sorting. Unmerge any cells in your data range and try sorting again.
Frequently Asked Questions
Why is my bar chart in the opposite order of my table?
Excel's default behavior for horizontal bar charts is to plot data from the bottom up. To fix this, use the "Categories in reverse order" option in the Format Axis menu.
Can I drag and drop bars to rearrange them?
No, you cannot drag the bars directly within the chart area. You must rearrange the rows in the source data table or use the sort functions.
How do I sort bars from largest to smallest?
Click a cell in the value column of your data table, go to the Data tab, and select Sort Z to A (Descending). This will place the largest bar at the top or left.
Will sorting my data affect other formulas in my sheet?
As long as your formulas use cell references that move with the data (like relative references within a table), they will remain intact. However, be cautious if you have formulas pointing to specific fixed cells outside the sorted range.
Does this work for 3D bar charts?
Yes, the sorting and axis reversal methods work for 3D bar and column charts exactly as they do for 2D charts.