View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.charting
PeterQ
 
Posts: n/a
Default "Unable to set the Formula property of the Series class" with a tw

I have built large workbook of software test metrics for dozen of products
(by rows) with results organized by week over the columns. I have created
dynamic ranges that select a moving window of dates (for the x-axis) and a
corresponding moving window of metrics for each metric and product.

I have created a row of reference charts for the first product. My VBA code
copies the reference charts for each prduct under test and pastes them in a
grid, then rewrites the series formulas of the charts to reference the
correct products.

The formula re-writing code is failing with the dreaded "Unable to set the
Formula property of the Series class" error. The original formula and the
replacement formula are each 144 characters in length, though several of the
terms in the formula are dynamic ranges. I haven't seen a definitive
statement on whether dynamic ranges are expanded before the 255 char VBA
formula limit is applied.

Here's the original formula for one of the series in a collection of 3 for
one chart:
=SERIES(Weekly_Release_Data!$E$27,'Sample-Defects-Test-Data.xls'!DateTextSpan,Weekly_Release_Data!'RelW00 1_Total_Test_Pass_Rate_Span',1)

(The quotes around "RelW002_Total_Test_Pass_Rate_Span" were returned by the
..formula property - they do not show in the formula bar.)

I want to change the "001" to another value, and have used various
approaches, each of which results in the error.

RelW001_Total_Test_Pass_Rate_Span is defined as:
=OFFSET(INDEX(RelW001_Total_Test_Exposure_Rate,1,C urCol-3),0,-MIN(PeriodsPast,CurCol-5)-1,1,MIN(PeriodsPast,CurCol-5)+PeriodsForward)

RelW001_Total_Test_Exposure_Rate is defined as:
=Weekly_Release_Data!$F$25:$BK$25

PeriodsPast and PeriodsForward are defined as small constants like 26 and 13.
CurCol is defined as Control!$C$3.

All the named ranges are generated by VBA code from row titles, so it is
possible to shorten them, but I would need a lookup table to convert from the
"plain english" titles to condensed names if that is required to get under
some limit.

Thanks in advance..
-- Peter