To sort a bar chart in Excel, you must sort the source data table that the chart is linked to. Because Excel charts are dynamic reflections of their underlying data, any change in the order of the rows or columns in your spreadsheet will immediately update the order of the bars in your chart. Sorting your data allows you to transform a cluttered visual into a clear ranking, making it easy to identify the highest and lowest values at a glance.

What You'll Need

  • A Microsoft Excel workbook containing a data table.
  • An existing bar or column chart created from that data.
  • Permissions to edit the worksheet.

Step-by-Step

  1. Select your data: Click on any single cell within the data range that fuels your bar chart. Ensure you are clicking inside the table of values, not on the chart itself.
  2. Open the Sort menu: Navigate to the Data tab on the top ribbon. In the Sort & Filter group, you will see the Sort button.
  3. Choose your sort order:
    • For a quick sort, click the A-Z icon (Ascending) to sort from smallest to largest.
    • Click the Z-A icon (Descending) to sort from largest to smallest.
  4. Use Custom Sort for complex tables: If your data has headers or multiple columns, click the larger Sort button to open the Sort dialog box.
    • Check the box that says My data has headers.
    • Under Column, select the name of the column containing the numerical values you want to sort by.
    • Under Order, choose Smallest to Largest or Largest to Smallest.
    • Click OK.
  5. Verify the chart update: Look at your bar chart. The bars will have automatically shifted positions to match the new order of your spreadsheet rows.

Common Mistakes

  • Sorting only one column: A common error is selecting only the numbers and sorting them without expanding the selection to the labels. This "unlinks" the data from the labels, meaning your chart will show the right numbers but attached to the wrong names. Always ensure the entire table is sorted together.
  • Trying to drag bars manually: You cannot click and drag individual bars within an Excel chart to rearrange them. The chart is a mirror; you must change the source data to change the visual.
  • Ignoring hidden rows: If you have filtered or hidden rows in your data table, they may still be affecting the chart's scale or order. Ensure your filter settings are consistent with what you want to display.

Tips

  • The "Reverse Order" Trick: In some bar charts (specifically horizontal bar charts), Excel plots the data from the bottom up. This means a "Largest to Smallest" sort in your table might appear as "Smallest to Largest" on the chart. To fix this, right-click the vertical axis (the category names), select Format Axis, and check the box for Categories in reverse order.
  • Use Excel Tables: Convert your data range into an official Table (Ctrl + T). Tables have built-in filter arrows in the header row, allowing you to sort your chart with two clicks without needing to go to the Data tab.
  • Dynamic Sorting: For advanced users, using the SORT function in a separate range can create a "helper table" that updates the chart automatically whenever new data is entered.

Troubleshooting

If your chart does not update after sorting the data, try these steps in order:

  1. Check for merged cells: Excel cannot sort ranges that contain merged cells. Unmerge any cells in your data table and try sorting again.
  2. Verify the data range: Right-click the chart and choose Select Data. Ensure the "Chart data range" covers the entire area you are sorting. If the range is hard-coded to specific cells rather than a table, sorting might not trigger a refresh.
  3. Check for protected sheets: If the Sort buttons are greyed out, the worksheet may be protected. Go to the Review tab and click Unprotect Sheet.
  4. Refresh the calculation: If the chart seems frozen, press F9 to force Excel to recalculate all formulas and chart links.

Frequently Asked Questions

Can I sort a chart without changing the original data order?

No, standard Excel charts are directly linked to the source cells. To keep your original list intact while having a sorted chart, copy your data to a new area or a separate sheet, sort the copy, and build the chart from that sorted version.

Why is my horizontal bar chart sorted upside down?

Excel's default behavior for horizontal bars is to plot the first row of data at the bottom of the Y-axis. To fix this, right-click the axis labels, go to Format Axis, and enable Categories in reverse order.

Does sorting the chart affect my formulas?

As long as your formulas use cell references within the same row (e.g., =B2*C2), sorting will not break them. However, if you have formulas pointing to specific absolute cells (like =$B$2) that are meant to stay fixed regardless of order, be careful as the data moving may change the meaning of your results.

How do I sort a chart by a column that isn't actually in the chart?

You can sort your source table by any column, even if that column isn't used to build the chart. The chart will simply follow the order of the rows in the table, regardless of which specific columns are being visualized.

Can I sort a chart automatically as I add new data?

Standard sorting is manual. To make it automatic, you must use the SORT or FILTER functions to create a dynamic array that feeds the chart, or use a VBA macro to trigger a sort whenever a cell value changes.