Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Adjust series order in Excel 2007

We are trying to automate the creation of a column chart with two data
series, wherein one of the series is attached to the secondary axis. We
create two additional 'dummy' or blank series with zero values (two series
attached to primary axis; two series attached to secondary axis) so the
secondary column series does not 'jump' in front of the primary column series.

We cannot dictate the order of the series on the worksheet to the user, so
we need to be able to adjust the series order.

Does anyone know the code to manipulate the series order in Excel 2007?

Thank you very much.

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 256
Default Adjust series order in Excel 2007

There is a property you can set in the Series object to move to
secondary axis. The following line will move the first series of the
active chart to the secondary axis:

ActiveChart.SeriesCollection(1).AxisGroup = xlSecondary

If you want to change the order of their appearance, you have to do it
by chart group. This code will cause the first series of the first
chart group of the active chart to be plotted second:

ActiveChart.ChartGroups(1).SeriesCollection(1).Plo tOrder = 2

Hope that helps.

On Dec 13, 10:59 am, MikeM_work
wrote:
We are trying to automate the creation of a column chart with two data
series, wherein one of the series is attached to the secondary axis. We
create two additional 'dummy' or blank series with zero values (two series
attached to primary axis; two series attached to secondary axis) so the
secondary column series does not 'jump' in front of the primary column series.

We cannot dictate the order of the series on the worksheet to the user, so
we need to be able to adjust the series order.

Does anyone know the code to manipulate the series order in Excel 2007?

Thank you very much.

Mike


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Adjust series order in Excel 2007

ilia:
Thanks a million; you've put us on the right track!

Mike

"ilia" wrote:

There is a property you can set in the Series object to move to
secondary axis. The following line will move the first series of the
active chart to the secondary axis:

ActiveChart.SeriesCollection(1).AxisGroup = xlSecondary

If you want to change the order of their appearance, you have to do it
by chart group. This code will cause the first series of the first
chart group of the active chart to be plotted second:

ActiveChart.ChartGroups(1).SeriesCollection(1).Plo tOrder = 2

Hope that helps.

On Dec 13, 10:59 am, MikeM_work
wrote:
We are trying to automate the creation of a column chart with two data
series, wherein one of the series is attached to the secondary axis. We
create two additional 'dummy' or blank series with zero values (two series
attached to primary axis; two series attached to secondary axis) so the
secondary column series does not 'jump' in front of the primary column series.

We cannot dictate the order of the series on the worksheet to the user, so
we need to be able to adjust the series order.

Does anyone know the code to manipulate the series order in Excel 2007?

Thank you very much.

Mike



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
For chart syles, why doesn't color order match series order? AMiller Charts and Charting in Excel 1 October 29th 09 12:02 AM
line series order Excel 2007 rolando Charts and Charting in Excel 3 March 24th 09 09:49 PM
How do I change the legend Series order in Excel 2007? Csmith Excel Discussion (Misc queries) 2 July 20th 07 10:26 PM
How do I change the Series plotting order in Excel 2007? Csmith Excel Discussion (Misc queries) 0 July 20th 07 08:52 PM
Excel, How do I get rows to adjust to cronological order of date Jay.... Needing help Excel Discussion (Misc queries) 7 July 7th 06 08:21 PM


All times are GMT +1. The time now is 02:22 AM.

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

About Us

"It's about Microsoft Excel"