Solved

Excel 2003 Make Graph on changing table

Posted on 2010-08-29
4
232 Views
Last Modified: 2012-06-21
Hi All,

I have a chart that is list a bunch of suff (obviously).  I have a visual basic script that filters this data down to four rows....

I then have a graph that is based on the current four rows.

My problem is that the rows may never be the same.  So I can not write something like:
    ActiveChart.SeriesCollection(2).Values = "='results'!$B$32:$B$35"

because the rows may be showing rows 131-134...

So my question is, is there a way to put the values of a series based on an updated table.. wonder if this makes sense...
0
Comment
Question by:sporenza
[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
  • 2
4 Comments
 

Author Comment

by:sporenza
ID: 33554162
I have tried:

    ActiveChart.SeriesCollection(1).XValues = "=results!R2C1:R5C1"

This does not work either....
I get the error "Invalid Parameter"
0
 

Author Comment

by:sporenza
ID: 33554178
Actualy

ActiveChart.SeriesCollection(1).XValues = "=results!R2C1:R5C1"

Works but it is still A2:A5,

I want the first 5 visible rows...
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 500 total points
ID: 33554462
Hello sporenza,

Excel will normally not plot data that is filtered out. In the attached file, the chart is built on all data in rows 1 to 13, but a filter is applied. Only the three visible rows are showing.

Click the chart, then click Tools - Options - Chart tab and tick "Plot visible cells only". This is independent of any VBA code, so, in your code you can simply address the whole table.

cheers, teylyn
Book1.xls
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

728 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