PC Review


Reply
Thread Tools Rate Thread

Assigning array values to seriescollection

 
 
Gerardo
Guest
Posts: n/a
 
      11th Mar 2008
Hello,

I tried to add a series to a graph and it worked ok as long as the selected
range to build the array has less than 13 values.

What I do is get a range from user input. Then assign it to a range
variable. I create an array and start adding elements to keep the cummulative
from the given data. Then assigning this array to display as a cummulative
series and plot it with the original range.

What can I do to make it work after the 13th data input?

Set RngMensual = Application.InputBox("My prompt", "My Title", Type:=8)

For Each RngCelda In RngMensual
SngTotal = RngCelda.Value + SngTotal
ReDim Preserve SngAnual(i)
SngAnual(i) = SngTotal
i = i + 1
Next RngCelda

Charts.Add
With ActiveChart
.ChartType = xlLineMarkers
.SeriesCollection.NewSeries
'.SeriesCollection(1).Values = SngAnual
.SetSourceData Source:=RngAnual
.SeriesCollection(1).Select
With Selection.Border
.ColorIndex = 11
.Weight = xlMedium
.LineStyle = xlContinuous
End With
 
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
Limit on array when using seriescollection.XValues and .Values met =?Utf-8?B?UGFzaSBIdXNzbw==?= Microsoft Excel Programming 1 24th Oct 2006 09:56 PM
assigning values to array Juggernath Microsoft Excel Programming 16 26th Nov 2005 07:21 PM
assigning values to an array Juggernath Microsoft Excel Programming 2 25th Nov 2005 03:38 AM
Assigning values from a sheet to an array Anne-Marie Microsoft Excel Discussion 3 21st May 2004 10:33 PM
Assigning Array Values MWE Microsoft Excel Programming 6 26th Jan 2004 04:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 PM.