swapping axis'

B

baltobernie

In Excel 2002, Column "A" data: 6, 7 8, 9, 10. Column "B" data: 200, 300,
400, 500

When I try to create a line chart, Column "B" data is in the X axis. I want
Column "A" data on the X axis, so I swap the two columns. No matter, the
chart still puts 200, 300, etc. on the X axis!

How do I choose which column is X, and which is Y?
 
J

Jon Peltier

If you put the X values to the left of the Y values, select them both, and
create the chart, Excel should automatically use the leftmost column for X
values.

Quick trick: so Excel doesn't make two sets of lines, make an XY chart
(which you probably want anyway, because the line chart treats X values as
nonnumeric labels). You can select an option that uses markers and lines. If
you still think you want a line chart per Microsoft's definition, you can
right click on the chart and pick Chart Type to change it.

- Jon
 
B

baltobernie

Yes, the XY chart is what I wanted, all along. OK, almost there:

1.) How do I add a secondary Y axis (data)? If I select columns A,B & C,
the chart is created with both lines and both axis correctly, but "add
secondary Y axis" is greyed out.

2.) How do I rename "Series 1" and "Series 2" labels?
 
E

EricG

1.) Right-click on the data series you want to move to the 2nd y axis.
Select "Format Data Series...". Select the "Axis" tab. Choose "Secondary
Axis".

2.) If the data you selected had header text (labels) at the top of each
row, then those labels would show up on the chart. If not, right-click on
the chart, select "Source Data...". Click on the "Series" tab. For each
series, type in a name in the "Name:" box.
 
B

baltobernie

Got it. Thank you.

EricG said:
1.) Right-click on the data series you want to move to the 2nd y axis.
Select "Format Data Series...". Select the "Axis" tab. Choose "Secondary
Axis".

2.) If the data you selected had header text (labels) at the top of each
row, then those labels would show up on the chart. If not, right-click on
the chart, select "Source Data...". Click on the "Series" tab. For each
series, type in a name in the "Name:" box.

--
 
J

Jon Peltier

You don't add a secondary axis. You format a series to be plotted on the
secondary axis, and this cues Excel to add the axis. Right click on a
series, choose Format Series, and on the Axis tab (2003) or on the main tab
(2007), select the secondary option.

To start out with labels (assuming the two series Y data are in columns B
and C) put the labels in the row above the data in columns B and C, and
leave the corresponding cell in column A blank. Select the data including
this first row, and Excel adds the labels as series names.

To add series names to existing series, select the series and look in the
formula bar. If there are no labels already, the formula will start like

=SERIES(,

Click between the opening paren and the comma, and type the name you want in
quotes. Or click between the opening paren and the comma, then click on the
cell that contains the series name, so the formula will begin something
like:

=SERIES("First Series",

or

=SERIES(Sheet1!$B$1,

Items in the formula after the first column are the X values, the Y values,
and the plot order of the series. For more info:

http://peltiertech.com/Excel/ChartsHowTo/ChartSeriesFormula.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______
 

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