Solved

Dynamic chart data source...

Posted on 2014-04-20
1
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

615 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