I have a macro to make a chart, and I am trying to tweak it so that it will assign the appropriate labels to the axes. I have the macro set up so that all I have to do is pick the two rows that I want plotted against one another, and it then makes separate series in those rows for each data point.
I am trying to make it so that it will also pick the value of the axis from the A column. The code I have been trying is:
labelX = "=sheet1!A" & xvalues
and
.AxisTitle.Text = labelX
where labelX is a string and xvalues is the input for the row number of the relevant data.
Excel doesn't like this code. Any idea how to fix it?
Bookmarks