Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Assigning array values to seriescollection

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
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
Limit on array when using seriescollection.XValues and .Values met Pasi Husso Excel Programming 2 October 25th 06 08:05 AM
assigning values to array Juggernath[_4_] Excel Programming 16 November 26th 05 07:21 PM
assigning values to an array Juggernath[_4_] Excel Programming 2 November 25th 05 03:38 AM
Assigning Array Values MWE[_16_] Excel Programming 6 January 26th 04 04:35 AM
Possible to assign an array to a SeriesCollection Stephen Boulet Excel Programming 2 November 13th 03 06:36 PM


All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"