I have a chart in a Worksheet in Excel and I have a macro set up so that when I change the value in a certain cell the range of data in the chart is set to A2 down as far as the row number corresponding in this certain cell.
What I can’t seem to be able to do is to modify the axis as the specified axis no longer covers the range of the graph i.e. the current X axis is set to:
=Sheet1!$C$2:$C$600
I can’t figure out how I can update this in a macro. Any help would be much appreciated.
You should be able to set the XValues property in the same way you did in Lance’s answer for your other question.
or whatever you call the named range for the x-axis values. If you have multiple series in your chart, you’ll want to change the value in SeriesCollection to refer to the right series.