How do I swap X & Y Axes on a Chart

G

Guest

Folks
A colleague has created a chart but needs to swap the X & Y axes. I know
this isn't as easy as it sounds, as I've been reading through lots of entries
in this forum. I have found Jon Peltier's fantastic little .zip file
(SwitchXYAxes.xls) however, when I try and run the "Active Chart - Switch X
Y Axes" option I get a run time error "1004 unable to gt the
MinimumScaleISAuto property of the Axis class". I'm now stuck as I know next
to nothing about VBA.

I would be really, really grateful if someone could come back with either an
answer to swapping axes, or to get Jon's little macro running.

Thanks a lot
Janet
 
G

Guest

Hi,

Right-click anywhere in the plot/graph area --> "Source Data" --> click on
the "Series" Tab and manually change the column labels in the ranges (letters
such as "A", "B"..) for "X Values" and "Y Values" (for eample, if X-Values is
Sheet1!$A$2:$A$101, and Y-Values is Sheet1!$B$1:$a$101, changes the "A"s to
"B"s and vice versa) --> "OK"

Regards,
B. R. Ramachandran
 
A

Andy Pope

Hi,

Any chance your chart is a Line chart and not a xy scatter chart.
Line charts have a categorical x axis so that property would not be
applicable.

Cheers
Andy
 
J

Jon Peltier

If the chart is embedded in the same worksheet as the data, you can select
the chart series, then notice where the colored rectangles are which denote
the series' data. Drag the Purple (X Values) and Blue (Y Values) rectangles
around the sheet to change the data range. It's best to drag one to a
neutral (but not blank) location, because if the two rectangles are on top
of one another, it's hard to keep track.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
J

Jon Peltier

I don't know why it didn't work. I've only rarely had it happen, but
sometimes others have had a problem. It could be some irregularity in the
source data range, or some additional bulleproofing I would have included if
it were a commercial package.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

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