dynamic graph data series

N

Nick Holway

Hi,

I'm trying to write a macro which creates a scatter plot with 16 data series
on the Y axis, each from an adjacent column. The data on the Y axis is of
variable length and starts in row 29, the first column with data is 8. I'm
trying to use xlDown to find the end. The X axis is a counter. My problem is
I can't seem to get the loop to move though the columns finding the end of
the data.

This is what I've come up with:

For i = 1 To 16

ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(i).XValues = i
ActiveChart.SeriesCollection(i).Values = Range(Cells(29, i + 7),
Cells(End(xlDown), i + 7))
ActiveChart.SeriesCollection(i).Name = "=ratios!R3C2"

Next i


Thanks in advance for any help.

Nick Holway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top