#1   Report Post  
Posted to microsoft.public.excel.charting
Sarge
 
Posts: n/a
Default Series Formula

Hi all,
have a curious problem when setting the formula on a series via code
(C#)

When setting the formula property like this

currentSeries.Formula="SERIES(\"TradeTranche1\",No de!$B$10:$B$70,(Node!$DC$10:$DC$70),1)"

the value that the formula now has is "SERIES("TradeTranche1",,{1},2)"

I'm OK about the plot order being different but the XRange is missing?! and
the YRange has been set to 1?!

A related detail is that the XRange is a series of values that go from 1 -
48 and then repeat again from 1 - 48 again i.e. non unique. This doesn't
seem to be an issue in other charting situations but may be relevant.

Thanks in advance

Mark





  #2   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier
 
Posts: n/a
Default Series Formula

Don't ask me about C# (I thought that meant C-pound, until my musician
daughter laughed at me!), but I know a little about charts.

=SERIES("TradeTranche1",,{1},2)

looks like the series formula for a newly added series that has only had its
series name defined. Excel uses the one element array {1} for the default Y
Values of a new series.

In your series formula command, why are the Y values in parens but the X
values are not? This sequence:

activechart.SeriesCollection.newseries
activechart.SeriesCollection(2).formula= _
"=SERIES(""TradeTranche1"",Node!$B$10:$B$70,(Node! $DC$10:$DC$70),1)"

leaves me with a one-point series with this formula:

=SERIES(,,{1},2)

in which not even the series name is changed. Whereas this

activechart.SeriesCollection.newseries
activechart.SeriesCollection(2).formula= _
"=SERIES(""TradeTranche1"",Node!$B$10:$B$70,Node!$ DC$10:$DC$70,1)"

produces a series with this formula:

=SERIES("TradeTranche1",Node!$B$10:$B$70,Node!$DC$ 10:$DC$70,1)

Remove the extra parentheses and see what you get.

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


"Sarge" wrote in message
...
Hi all,
have a curious problem when setting the formula on a series via code
(C#)

When setting the formula property like this

currentSeries.Formula="SERIES(\"TradeTranche1\",No de!$B$10:$B$70,(Node!$DC$10:$DC$70),1)"

the value that the formula now has is "SERIES("TradeTranche1",,{1},2)"

I'm OK about the plot order being different but the XRange is missing?!
and the YRange has been set to 1?!

A related detail is that the XRange is a series of values that go from 1 -
48 and then repeat again from 1 - 48 again i.e. non unique. This doesn't
seem to be an issue in other charting situations but may be relevant.

Thanks in advance

Mark







  #3   Report Post  
Posted to microsoft.public.excel.charting
Sarge
 
Posts: n/a
Default Series Formula

Hi Jon,

firstly thanks for the reply,

secondly your knowledge is strong in the ways of excel.

Just for further clarification which may be of some value for others:

My code had been dynamically creating a set of ranges to make up the series,
in most cases it would be like this

"=SERIES(""TradeTranche1"",Node!$B$10:$B$70,(Node! $AZ$10:$AZ$20,
Node!$DC$21:$DC$70),1)"

But in some cases the node range Node!$AZ$10:$AZ$20, was not required and
hence leaving a single range with brackets around it and causing some kind
non lethal parsing error.

Thanks for the solution!

Mark


"Jon Peltier" wrote in message
...
Don't ask me about C# (I thought that meant C-pound, until my musician
daughter laughed at me!), but I know a little about charts.

=SERIES("TradeTranche1",,{1},2)

looks like the series formula for a newly added series that has only had
its series name defined. Excel uses the one element array {1} for the
default Y Values of a new series.

In your series formula command, why are the Y values in parens but the X
values are not? This sequence:

activechart.SeriesCollection.newseries
activechart.SeriesCollection(2).formula= _
"=SERIES(""TradeTranche1"",Node!$B$10:$B$70,(Node! $DC$10:$DC$70),1)"

leaves me with a one-point series with this formula:

=SERIES(,,{1},2)

in which not even the series name is changed. Whereas this

activechart.SeriesCollection.newseries
activechart.SeriesCollection(2).formula= _
"=SERIES(""TradeTranche1"",Node!$B$10:$B$70,Node!$ DC$10:$DC$70,1)"

produces a series with this formula:

=SERIES("TradeTranche1",Node!$B$10:$B$70,Node!$DC$ 10:$DC$70,1)

Remove the extra parentheses and see what you get.

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


"Sarge" wrote in message
...
Hi all,
have a curious problem when setting the formula on a series via code
(C#)

When setting the formula property like this

currentSeries.Formula="SERIES(\"TradeTranche1\",No de!$B$10:$B$70,(Node!$DC$10:$DC$70),1)"

the value that the formula now has is "SERIES("TradeTranche1",,{1},2)"

I'm OK about the plot order being different but the XRange is missing?!
and the YRange has been set to 1?!

A related detail is that the XRange is a series of values that go from
1 - 48 and then repeat again from 1 - 48 again i.e. non unique. This
doesn't seem to be an issue in other charting situations but may be
relevant.

Thanks in advance

Mark









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
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
adding row to forumla carrera Excel Discussion (Misc queries) 9 August 23rd 05 10:24 PM
Can I use AutoFill or a formula to fill a series of letters? tadpgk835 Excel Discussion (Misc queries) 3 April 28th 05 02:46 PM
Quasi Transpose / Stacking Columns Mike Excel Worksheet Functions 10 April 26th 05 08:04 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 04:10 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"