How to swap your X and Y axes in Excel
To swap the X and Y axes in an Excel chart, right-click the chart and select Edit Data. In the dialog that opens, click the Switch Row/Column button. Excel will flip which data appears on each axis — what was horizontal becomes vertical, and what was vertical becomes horizontal. This works for most chart types, though some (like pie charts) do not have swappable axes.
If you want to keep your data in the same order but just change which axis displays which information, switching row and column is the fastest method. The change takes effect when ready, and you can undo it if the result is not what you wanted.
For charts where the axes are already correct but you want to reverse the direction (so values count down instead of up, or categories read right-to-left instead of left-to-right), you will need a different approach — see the section below on reversing axis direction.
Key Takeaways
- Right-click your chart, select Edit Data, and click Switch Row/Column to flip which data appears on the X and Y axes.
- Reversing an axis so it counts backward requires right-clicking the axis itself, selecting Format Axis, and checking Categories in reverse order.
- Relabeling an axis (changing "Sales" to "Revenue", for example) means right-clicking the axis and selecting Edit Axis Title.
- Some chart types, like pie and doughnut charts, do not have X and Y axes and cannot be swapped.
- You can change what data feeds into each axis by editing the chart's data range in the Select Data Source dialog.
Reversing the direction of an axis
Sometimes you want to keep the same data on each axis but reverse the direction — for example, showing months from right to left instead of left to right, or showing values counting down from top to bottom instead of bottom to top.
Right-click directly on the axis you want to reverse (not the chart itself). Select Format Axis from the menu. In the panel that appears on the right side of the screen, look for Axis Options and check the box next to Categories in reverse order. The axis will flip when ready.
This is different from switching row and column — you are not changing which data goes where, only the direction it displays. Use this when your chart is organized correctly but reads in the wrong direction for your audience.
Changing axis labels and titles
The title at the bottom or side of your chart (like "Month" or "Sales Revenue") is separate from the axis itself. To change it, right-click the title text directly and select Edit Axis Title. Type the new label and press Enter.
If your chart does not have an axis title, you can add one. Right-click the chart, select Chart Elements, and check the box next to Axis Titles. Excel will add a default title you can then edit by clicking it and typing.
Axis titles help readers understand what the numbers represent. "Units Sold" is clearer than leaving the axis unlabeled, and "Fiscal Year" is more specific than "Year".
Changing which data appears on each axis
If you want to change not just the direction but which columns of your spreadsheet feed into which axis, you need to edit the data range. Right-click the chart and select Select Data Source.
In the dialog that opens, you will see two sections: Legend Entries (Series) on the left and Horizontal (Category) Axis Labels on the right. The entries on the left are the data series (the lines or bars in your chart). The labels on the right are what appears along the bottom or left edge.
To move a data series from one axis to another, select it in the left panel and click Edit. You can then change which column it pulls from. To change the category labels, click Edit under the right panel and point to a different range of cells in your spreadsheet.
This approach is more detailed than switching row and column, but it gives you precise control over what data goes where — useful when your spreadsheet has many columns and you want only some of them in the chart.
Chart types that do not have swappable axes
Pie charts, doughnut charts, and radar charts do not have traditional X and Y axes. Instead, they display data as slices or points around a circle. You cannot swap or reverse these axes because they do not exist in the same way.
If you have a pie chart and want to reorganize how the data displays, your options are limited to changing the order of the data in your spreadsheet itself, or switching to a different chart type (like a bar or column chart) that does have axes you can manipulate.
Bubble charts and scatter plots have both X and Y axes, but they work differently from bar or line charts — the position of each point matters, not just the height or length. Swapping axes in a scatter plot will change which variable is independent and which is dependent, which can change the meaning of your chart.
Common mistakes when changing axes
The most common error is confusing the axis title with the axis itself. Changing the title (the label) does not change what data appears on that axis — it only changes the text readers see. If your chart is showing the wrong data on each axis, you need to switch row and column or edit the data source, not just relabel.
Another mistake is forgetting that some data should not be swapped. If you have a time series (data over months or years), the time should almost always be on the horizontal axis. Swapping it to vertical can make the chart harder to read and confuse your audience about what the data represents.
Finally, remember that reversing an axis is not the same as sorting your data. If you reverse the axis direction, the data order stays the same — only the direction of the numbers changes. If you want to reorder the data itself (like sorting months alphabetically instead of chronologically), you need to change the order in your spreadsheet.
When to use a different chart type instead
Sometimes the problem is not the axes but the chart type itself. If you find yourself constantly swapping, reversing, and relabeling axes to make your data make sense, the chart type may be wrong for what you are trying to show.
A line chart works best for trends over time. A bar chart works best for comparing amounts across categories. A scatter plot works best for showing the relationship between two continuous variables. If you are fighting the chart to make it work, switching to a type that matches your data naturally will save time and produce a clearer result.
Excel makes it straightforward to change chart types — right-click the chart, select Change Chart Type, and pick a different option. You can always switch back if the new type does not work better.
Frequently Asked Questions
Why does my chart look wrong after I switch row and column?
Switching row and column flips which data series become the bars or lines and which become the category labels. If your spreadsheet is organized with data in columns and categories in rows, the switch might put the wrong information on each axis. Check your original data layout and consider whether you need to rearrange the spreadsheet instead.
Can I have two different scales on the same chart?
Yes. Right-click a data series (a line or bar), select Format Data Series, and choose Secondary Axis. This creates a second Y axis on the right side of the chart with its own scale. Use this when comparing two measurements with very different ranges — like revenue (in thousands) and customer count (in hundreds).
How do I change the numbers on an axis (like from 0–100 to 0–50)?
Right-click the axis itself and select Format Axis. Under Axis Options, you can set the minimum and maximum values manually. You can also change the interval (how often the numbers appear) and whether the axis starts at zero.
What if I want to show categories in a specific order that is not alphabetical?
Arrange them in that order in your spreadsheet before creating the chart. Excel will use the order from your data. If the chart is already made, you can edit the data source and manually reorder the category labels, or rearrange the rows and columns in the spreadsheet and the chart will update automatically.
Can I rotate the axis labels so they are easier to read?
Yes. Right-click the axis labels (the text along the bottom or side), select Format Axis, and look for Text Orientation. You can rotate them at any angle — 45 degrees is common for long category names that would otherwise overlap.