Solved

Excel 2003 Make Graph on changing table

Posted on 2010-08-29
4
227 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
  • 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 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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