inverting data for a graph

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way I could invert a series on a graph? Lets say my data points
are 3,9,2,4,7, but I really want graphed 7,4,2,9,3. Is there a way I could
just switch this in chart options? Here's the complicated part, a simple
solution would be to just invert the numbers in the worksheet using the index
function. However, I'm trying to record a macro and it seems impossible to do
if I use the index function because for different groups of data I'm not sure
what my last cell number will be. Any help?
 
Hi Chris, you could switch this in chart options

HTH
Regards from Brazil
Marcelo


"Chris" escreveu:
 
Chris,

Not sure how you're populating your chart data, but here's a couple of
hints. Try Marcello's suggestion about the chart options. If that doesn't
work, you could sort your data in Descending rather than Ascending order (
I'm assuming that 3,9,2,4,7 is another column associated with a date or
something where the sort order is sequential).

As far as your second question - 'don't know what the last cell number will
be' -- check out Jon Peltier's excellent page on dynamic charts. You'll
never have to manually adjust a chart range again.

http://peltiertech.com/Excel/Charts/index.html#hdrDyno
 
Click on a chart axis, then Format->Selected Axis...

Under the "Scale" tab, tick "Values in reverse order"

HTH,
Ryan
 
Well I have two series that graphed, so inverting the axis inverts both
series. I only want one series inverted is this possible?
 
If you are talking about the Y (vertical) axis:

1. Select the data series you want to reverse
2. Format->Selected Data Series
3. Axis tab, select "Secondary axis"
4. Select the second Y axis
5. Format->Selected axis
6. Scale tab, tick "Values in reverse order"

If you are talking about the X (horizontal) axis, it is a little trickier,
but this should get you there to start with and you can tweak stuff
afterwards:

1. Do steps 1-3 as above
2. Chart->Chart Options
3. Axes tab, under "Secondary axis", tick "Category (X) axis" and untick
"Value(Y) Axis"
4. Select the second X axis
5. Format->Selected axis
6. Scale tab, tick "Categories in reverse order"

I've seen comments that this only works for Scatter (XY) charts, but it
works on a line chart for me, so maybe they were talking about an older
version.

HTH,
Ryan
 

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

Back
Top