Switching x-axis & y-axis on line chart

K

K. McQ

I am working with a large data spreadsheet with year,
number and currency data. My problem is when I extract
data to create a standard line chart, the chart is
defaulting to a specific x-axis and y-axis format with
data related to each axis. For visualization purposes, I
would prefer to have the data that is currently presented
on the x-axis to instead be presented on the y-axis. And
likewise, I would like the y-axis data be presented in the
x-axis. However, I have been unable to figure out how to
do this and the MS Excel Help menu does not seem to
address this. Can anyone help?
 
J

Jon Peltier

If you put the X data first in the worksheet, to the left of (or above
if you put it in rows) the Y data, Excel will draw the chart the way you
want it. If it's too much trouble to switch your data around and redraw
the charts, right click on the chart and choose Source Data from the pop
up menu, click on the series tab, and select a series from the list.
Switch the contents of the x values/categories box and the y values box.
Repeat for your other series.

I've posted a macro that does this for an XY Scatter chart (not a line
chart):
http://www.geocities.com/jonpeltier/Excel/Zips/SwitchXYAxes.zip

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top