ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   inverting data for a graph (https://www.excelbanter.com/excel-worksheet-functions/96121-inverting-data-graph.html)

Chris

inverting data for a graph
 
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?

Marcelo

inverting data for a graph
 
Hi Chris, you could switch this in chart options

HTH
Regards from Brazil
Marcelo


"Chris" escreveu:

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?


JonR

inverting data for a graph
 
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

"Chris" wrote:

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?


Chris

inverting data for a graph
 
I looked through all the chart options, where do you see it?

"Marcelo" wrote:

Hi Chris, you could switch this in chart options

HTH
Regards from Brazil
Marcelo


"Chris" escreveu:

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?


Ryan Poth

inverting data for a graph
 
Click on a chart axis, then Format-Selected Axis...

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

HTH,
Ryan

"Chris" wrote:

I looked through all the chart options, where do you see it?

"Marcelo" wrote:

Hi Chris, you could switch this in chart options

HTH
Regards from Brazil
Marcelo


"Chris" escreveu:

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?


Chris

inverting data for a graph
 
Well I have two series that graphed, so inverting the axis inverts both
series. I only want one series inverted is this possible?

"Ryan Poth" wrote:

Click on a chart axis, then Format-Selected Axis...

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

HTH,
Ryan

"Chris" wrote:

I looked through all the chart options, where do you see it?

"Marcelo" wrote:

Hi Chris, you could switch this in chart options

HTH
Regards from Brazil
Marcelo


"Chris" escreveu:

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?


Ryan Poth

inverting data for a graph
 
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


"Chris" wrote:

Well I have two series that graphed, so inverting the axis inverts both
series. I only want one series inverted is this possible?

"Ryan Poth" wrote:

Click on a chart axis, then Format-Selected Axis...

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

HTH,
Ryan

"Chris" wrote:

I looked through all the chart options, where do you see it?

"Marcelo" wrote:

Hi Chris, you could switch this in chart options

HTH
Regards from Brazil
Marcelo


"Chris" escreveu:

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?



All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com