I have a chart that I want to produce from a variable table range.
the range is cell GraphData!A26 which is fixed, and cell B24 contains a computed value for the end range i.e. GraphData!M29, which when linked as an indrect cell works great.
I am trying to create a macro for a button to update the graph as if different options are selected then the graph range changes.
So far I have this:
Sub UpdateSpendGraph()
ActiveSheet.ChartObjects("Chart 117").Activate
ActiveChart.ChartArea.Select
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets("GraphData").Range("A26:" & Range("B24").Value).Select, _
PlotBy:=xlRows
End Sub
I am having trouble with the range, after looking at other threads i've tried Range("A26:" & Range("B24").Value).Select however it isn't working.
Any help would be great, thanks
Bookmarks