Excel: How to Interchange Axis in a Chart
In this article
To interchange the axes in an Excel chart, click the chart, open Chart Design > Switch Row/Column (called Select Data in some versions), or right-click the chart and choose Select Data, then edit the series to swap the X and Y ranges. For scatter (XY) charts, right-click the chart, choose Select Data, edit the series, and swap the X and Y values. This flips which data series runs along the horizontal axis and which runs along the vertical axis, so categories and values trade places. The exact labels can differ slightly by Excel version, platform (Windows, Mac, web) and region, but the Select Data dialog is the reliable fallback in every version.
What You'll Need
- An Excel workbook containing at least one chart (column, bar, line, area, or scatter/XY).
- Source data laid out in a table or range, with clear headers for categories and values.
- Excel for Windows, Mac, or Excel for the web. The steps below focus on Windows and Mac desktop; the web version has a reduced chart editor.
Step-by-Step
- Select the chart. Click once inside the chart area so the chart border and handles appear. The ribbon should show the Chart Design and Format tabs (on Mac, the Chart Design tab appears after selecting the chart).
- Try the quick switch first. On the ribbon, go to Chart Design > Switch Row/Column. This is the fastest way to interchange axes for most column, bar, line, and area charts. If the button is greyed out, the chart type or data layout does not support it, so use the Select Data method below.
- Open Select Data. Right-click the chart and choose Select Data, or on the ribbon click Chart Design > Select Data. The Select Data Source dialog opens with two lists: Chart data range at the top, and Legend Entries (Series) on the left with Horizontal (Category) Axis Labels on the right.
- Decide what to swap. For a standard chart, interchanging axes usually means swapping which column is the category axis and which is the series. In the Select Data Source dialog, use Edit on a series to change its Series name, Series X values, and Series Y values. Use Edit under Horizontal (Category) Axis Labels to change the category range.
- Swap the ranges for a scatter chart. Scatter charts are the exception: the X and Y values are set per series. Select the series in the Legend Entries list, click Edit, then swap the ranges in the Series X values and Series Y values boxes. Click OK to apply.
- Confirm and close. Click OK in the Edit Series dialog, then OK in the Select Data Source dialog. The chart redraws with the axes interchanged.
- Adjust axis titles and labels. After swapping, the axis titles may still say the old names. Click each axis title and retype it, or go to Chart Design > Add Chart Element > Axis Titles to add or edit titles. Check that category labels are readable and rotate them if needed via Format Axis > Text Options.
- Fix the chart type if needed. If the swapped chart looks wrong (for example, a bar chart now runs vertically when you wanted horizontal), right-click the chart, choose Change Chart Type, and pick the orientation that matches your intent.
Common Mistakes
- Using Switch Row/Column on a scatter chart. That button does not swap X and Y for scatter charts; you must edit the series ranges in Select Data.
- Swapping the data range instead of the series. Changing the Chart data range at the top of Select Data Source often produces unexpected results. Edit individual series and axis labels instead.
- Forgetting axis titles. The chart may look correct but the axis titles still describe the old orientation, which confuses readers.
- Editing the source data by mistake. Interchanging axes in the chart does not rearrange your worksheet cells. If you want the table itself transposed, use Paste Special > Transpose on a copy of the data.
- Assuming the web version matches desktop. Excel for the web has a simpler chart editor; Switch Row/Column may be missing, so use the desktop app for full control.
Tips
- Keep a clean source table with one header row and no blank rows; Select Data picks up ranges more reliably.
- Use Switch Row/Column first for column, bar, line, and area charts; it is reversible with one click.
- For scatter charts, label the X and Y columns clearly in the worksheet so you can identify them in the Edit Series dialog.
- If you only need the table transposed, copy the range, then use Paste Special > Transpose on a new sheet rather than rebuilding the chart.
- After swapping, check the legend order. You can reorder series in Select Data Source using the up and down arrows next to the Legend Entries list.
Troubleshooting
- Switch Row/Column is greyed out. The chart type or data layout does not support it. Use Select Data and edit series and axis labels manually.
- The chart looks blank or shows wrong values after swapping. Reopen Select Data and verify each series' X and Y ranges. A common cause is selecting the header row as data or missing a column.
- Category labels are numbers instead of names. In Select Data Source, edit the Horizontal (Category) Axis Labels range to point at the label column, not the value column.
- The chart did not change. Make sure you edited the correct series and clicked OK in both dialogs. If the chart is linked to a PivotChart, use PivotChart Fields instead; Switch Row/Column behaves differently there.
- Excel for the web lacks the option. Open the file in Excel desktop to interchange axes, then save; the change carries over to the web view.
Frequently Asked Questions
Does interchanging axes change my worksheet data?
No. Switching axes only changes how the chart plots the existing ranges. Your cells stay exactly as they are. To rearrange the table itself, use Paste Special > Transpose on a copy.
Why is Switch Row/Column missing for my scatter chart?
Scatter (XY) charts treat X and Y as independent value ranges per series, so the row/column switch does not apply. Use Select Data > Edit and swap the Series X values and Series Y values boxes instead.
Can I interchange axes in a PivotChart?
PivotCharts use PivotChart Fields rather than the standard Select Data dialog. Drag fields between the Axis and Legend areas in the PivotChart Fields pane to change what appears on each axis.
Will the change carry over if I open the file in Excel for the web?
Yes, the chart keeps its swapped orientation when opened in Excel for the web, but the web editor may not offer the Switch Row/Column button for further changes. Use the desktop app for edits.
How do I swap the axes back?
Click Switch Row/Column again, or reopen Select Data and restore the original ranges. Keeping a copy of the workbook before major chart edits makes reverting easy.
Can I interchange axes on a chart made from a recommended chart?
Yes. Recommended charts are ordinary charts once inserted, so Switch Row/Column and Select Data work the same way.