Solved

Dynamic chart data source...

Posted on 2014-04-20
1
271 Views
Last Modified: 2014-04-21
There is a line chart with "Chart data range" of :

ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Select
ActiveChart.SetSourceData Source:=Range("$D$1:$AA$1")

I want to add a 2nd dynamic series to this "Chart data range".

The second set will have values like:

0, 0, 0, 0, 10, 0, 0,0,0,0,....0
^--col1       ^--col 5            ^-- col24

D to AA are 24 columns. I am trying not having these zeros and 10 on the worksheet rather to be fed as digits if possible at all.

Question: How can amend the new series composed of zeros and another non zero number in the mix without having them typed on a worksheet?


Thank you.
0
Comment
Question by:Mike Eghtebas
1 Comment
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 500 total points
ID: 40012912
Add this

ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Values = Array(0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now