Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a problem with adding series to a newly created graph in VBA
The ranges for my data need to be pulled from a variable amount of sheets, based upon the data I am currently working with. The array to obtain the variable values is in an array of integers which may not be necessarily sequential. i.e on one book I may have the integers of 1, 2, 3, 4 on another I may have 1, 2, 3, 9, 10 I am able to create the series, and chart without any problems, however when I run my macro it gives an error of "series formula is too long" I checked the help, but I am not quite sure where I am going wrong here. below is my code, the parts that are only pertinent to making the charts. Set alpha_chartobj = Sheets("Alpha Face").ChartObjects.Add _ (250, 375, 75, 225) With alpha_chartobj.Chart .ChartType = xlLine For Each carrier_graph In Sheets("Sheet1").Range("D2:D" & carrier_array_upper) With .SeriesCollection.NewSeries .Values = Sheets("F" & carrier_graph).Range("B2:B" & last_row_filtered) .Name = "F" & carrier_graph End With Next End With |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Dec 17, 5:15 pm, wrote:
I have a problem with adding series to a newly created graph in VBA The ranges for my data need to be pulled from a variable amount of sheets, based upon the data I am currently working with. The array to obtain the variable values is in an array of integers which may not be necessarily sequential. i.e on one book I may have the integers of 1, 2, 3, 4 on another I may have 1, 2, 3, 9, 10 I am able to create the series, and chart without any problems, however when I run my macro it gives an error of "series formula is too long" I checked the help, but I am not quite sure where I am going wrong here. below is my code, the parts that are only pertinent to making the charts. Set alpha_chartobj = Sheets("Alpha Face").ChartObjects.Add _ (250, 375, 75, 225) With alpha_chartobj.Chart .ChartType = xlLine For Each carrier_graph In Sheets("Sheet1").Range("D2:D" & carrier_array_upper) With .SeriesCollection.NewSeries .Values = Sheets("F" & carrier_graph).Range("B2:B" & last_row_filtered) .Name = "F" & carrier_graph End With Next End With Sorry I forgot to mention the error "Series Formula is too long" occurs on the line: Set alpha_chartobj = Sheets("Alpha Face").ChartObjects.Add _ (250, 375, 75, 225) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to give range names (especially with relative reference) for series names and series values in Excel 2007 graphs? | Excel Programming | |||
HELP- Copy a Data Series to Other Graphs? | Excel Discussion (Misc queries) | |||
HELP- Copy a Data Series to Other Graphs? | Excel Discussion (Misc queries) | |||
HELP- Copy a Data Series to Other Graphs? | Excel Discussion (Misc queries) | |||
HELP- Copy a Data Series to Other Graphs? | Excel Discussion (Misc queries) |