Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
art art is offline
external usenet poster
 
Posts: 22
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
art art is offline
external usenet poster
 
Posts: 22
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.programming
art art is offline
external usenet poster
 
Posts: 22
Default Reversing the order of a chart

Great. Thanks a lot

Art


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reversing order of text Sonics Excel Discussion (Misc queries) 2 December 17th 09 02:42 PM
Reversing the order of data separated by commas within a cell? rome330 Excel Discussion (Misc queries) 5 February 9th 09 07:21 PM
Reversing chart Morten Snedker Charts and Charting in Excel 1 June 25th 07 12:13 PM
Autofill- Reversing Order Earl Excel Discussion (Misc queries) 4 July 31st 06 10:13 PM
Reversing the Order of a String carl Excel Worksheet Functions 6 December 7th 04 11:26 AM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"