PC Review


Reply
Thread Tools Rate Thread

Adjust series order in Excel 2007

 
 
MikeM_work
Guest
Posts: n/a
 
      13th Dec 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
 
Reply With Quote
 
 
 
 
ilia
Guest
Posts: n/a
 
      13th Dec 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).PlotOrder = 2

Hope that helps.

On Dec 13, 10:59 am, MikeM_work <MikeMw...@discussions.microsoft.com>
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 With Quote
 
MikeM_work
Guest
Posts: n/a
 
      13th Dec 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).PlotOrder = 2
>
> Hope that helps.
>
> On Dec 13, 10:59 am, MikeM_work <MikeMw...@discussions.microsoft.com>
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
line series order Excel 2007 rolando Microsoft Excel Charting 3 24th Mar 2009 09:49 PM
How do I change the legend Series order in Excel 2007? =?Utf-8?B?Q3NtaXRo?= Microsoft Excel Misc 2 20th Jul 2007 10:26 PM
How do I change the Series plotting order in Excel 2007? =?Utf-8?B?Q3NtaXRo?= Microsoft Excel Misc 0 20th Jul 2007 08:52 PM
Excel, How do I get rows to adjust to cronological order of date =?Utf-8?B?SmF5Li4uLiAgTmVlZGluZyBoZWxw?= Microsoft Excel Misc 7 7th Jul 2006 08:21 PM
Can I create a random order within a series of numbers in Excel? =?Utf-8?B?RGltdHJheA==?= Microsoft Excel Worksheet Functions 2 9th Nov 2005 03:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:31 AM.