Macro producing chart from variable length column
Assuming that it's all on one line in your code, it looks OK to me. What error
are you getting?
On Wed, 27 Oct 2004 19:15:03 -0700, "johnk"
wrote:
I'm trying to produce a chart in excel from variable length column using a
macro. I find the bottom of the column and assign the row number to variable
K. I then want to assign the SeriesCollection XValues and Values but can't
seem to do it using the Cells notation as shown below. Is there another way
to approach this using the variable K for the last row in the range?
ActiveChart.SeriesCollection(1).XValues =
ActiveSheet.Range(ActiveSheet.Cells(2, 1), ActiveSheet.Cells(K, 1))
Thanks
|