ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reversing the order of a chart (https://www.excelbanter.com/excel-programming/299742-reversing-order-chart.html)

art

Reversing the order of a chart
 
H
I have a line chart with 10 data series in it. I would like to reverse the order of the series. Is there an easy way to do this

An example: the data goes from 1, 2, 3, 4, to 10. I would like it to go from 10, 9, 8, to 1

I thought that I had seen something on reversing parts of a chart. The only thing that I found was Axes(xlvalue).ReversePlotOrder, and that didn't do what I wanted it to do. I could change the code for the way that it picks up the data, but I thought there was an easier way to do this

Thanks

Art

Jon Peltier[_7_]

Reversing the order of a chart
 
Art -

Seems to easy to be true:

Sub ReverseSeriesOrder()
Dim i As Long
For i = 1 To ActiveChart.SeriesCollection.Count
ActiveChart.SeriesCollection(i).PlotOrder = 1
Next
End Sub


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

Art wrote:

Hi I have a line chart with 10 data series in it. I would like to
reverse the order of the series. Is there an easy way to do this?

An example: the data goes from 1, 2, 3, 4, to 10. I would like it to
go from 10, 9, 8, to 1.

I thought that I had seen something on reversing parts of a chart.
The only thing that I found was Axes(xlvalue).ReversePlotOrder, and
that didn't do what I wanted it to do. I could change the code for
the way that it picks up the data, but I thought there was an easier
way to do this.

Thanks.

Art



art

Reversing the order of a chart
 
Hi Jo

That worked great, but I guess I wasn't clear enough. I was wanting to change the order of the category axis. Any other suggestions

Thanks again

Ar

----- Jon Peltier wrote: ----

Art

Seems to easy to be true

Sub ReverseSeriesOrder(
Dim i As Lon
For i = 1 To ActiveChart.SeriesCollection.Coun
ActiveChart.SeriesCollection(i).PlotOrder =
Nex
End Su


- Jo
------
Jon Peltier, Microsoft Excel MV
Peltier Technical Service
Tutorials and Custom Solution
http://PeltierTech.com
______

Art wrote

Hi I have a line chart with 10 data series in it. I would like t
reverse the order of the series. Is there an easy way to do this
An example: the data goes from 1, 2, 3, 4, to 10. I would like it t

go from 10, 9, 8, to 1
I thought that I had seen something on reversing parts of a chart

The only thing that I found was Axes(xlvalue).ReversePlotOrder, an
that didn't do what I wanted it to do. I could change the code fo
the way that it picks up the data, but I thought there was an easie
way to do this
Thanks
Ar




Jon Peltier[_7_]

Reversing the order of a chart
 
Oh. Do you want

Axes(xlCategory).ReversePlotOrder

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

Art wrote:

Hi Jon

That worked great, but I guess I wasn't clear enough. I was wanting to change the order of the category axis. Any other suggestions?

Thanks again.

Art

----- Jon Peltier wrote: -----

Art -

Seems to easy to be true:

Sub ReverseSeriesOrder()
Dim i As Long
For i = 1 To ActiveChart.SeriesCollection.Count
ActiveChart.SeriesCollection(i).PlotOrder = 1
Next
End Sub


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

Art wrote:

Hi I have a line chart with 10 data series in it. I would like to
reverse the order of the series. Is there an easy way to do this?
An example: the data goes from 1, 2, 3, 4, to 10. I would like it to

go from 10, 9, 8, to 1.
I thought that I had seen something on reversing parts of a chart.

The only thing that I found was Axes(xlvalue).ReversePlotOrder, and
that didn't do what I wanted it to do. I could change the code for
the way that it picks up the data, but I thought there was an easier
way to do this.
Thanks.
Art





art

Reversing the order of a chart
 
Great. Thanks a lot

Art


All times are GMT +1. The time now is 06:03 PM.

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