Solved

Dynamic chart data source...

Posted on 2014-04-20
1
277 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
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…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
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…

828 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