Solved

Excel 2003 Make Graph on changing table

Posted on 2010-08-29
4
223 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
Comment Utility
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
Comment Utility
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:
teylyn earned 500 total points
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

772 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