Chart with variable cell range

  • Thread starter Thread starter skelhorne
  • Start date Start date
S

skelhorne

I am looking to have a cell value as part of the range that is plotte
in a chart, for example

=SERIES(,Sheet1!$A*$1*:$A$10,Sheet1!$B*$1*:$B$10,1)

I would like to replace *$1* (for both A and B with a value that i
entered in another cell (say D15). The value in D15 would be tied to
scroll bar.

Any help would be appreciated
 
Hi
have a look at the INDIRECT function. You may also have a look at
=SERIES(,INDIRECT("Sheet1!$A$" & D15 & ":$A$10"),INDIRECT("Sheet1!$B$"
& D15 & ":$B$10"),1)
 
Thanks for the quick response.

Now I am getting a
"That function is not valid" error

When I click OK it highlights the first INDIRECT

=SERIES(,*INDIRECT*("Sheet1!$A$" & D15
":$A$10"),INDIRECT("Sheet1!$B$"
& D15 & ":$B$10"),1
 
consider add a scrollbar from 'Control Toolbox' right click it to inser
this code:

Private Sub ScrollBar1_Change()
Worksheets("Sheet1").Range("D1").Value = ScrollBar1.Value
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Values = "=Sheet1!R1C1:R"
Worksheets("Sheet1").Range("D1").Value & "C1"
ActiveChart.SeriesCollection(2).Values = "=Sheet1!R1C2:R"
Worksheets("Sheet1").Range("D1").Value & "C2"
End Sub



*I am looking to have a cell value as part of the range that i
plotted in a chart, for example

=SERIES(,Sheet1!$A$1*:$A$10,Sheet1!$B*$1*:$B$10,1)

I would like to replace *$1* (for both A and B with a value that i
entered in another cell (say D15). The value in D15 would be tied t
a scroll bar but I don’t know the syntax or if this is eve
possible.

Any help would be appreciated. [/B
 
Frank -

Unfortunately one cannot embed any functions within the SERIES formula.

- Jon
 
Thanks Jon. That's not the answer I wanted to hear but at least I ca
stop wasting my time trying to figure it out
 
Back
Top