title: Excel-VBA ActiveChart.FullSeriesCollection.Name not linking to cell
body: <p>Below are two examples for creating a name of a new series:</p>
  
  <pre><code>ActiveChart.FullSeriesCollection(1).Name = "='GSI with DSPV Data'!$BUX$4" 
  
  ActiveChart.FullSeriesCollection(1).Name = Worksheets("GSI with DSPV Data").Cells(nameRow, nameCol)
  </code></pre>
  
  <p><code>nameRow</code> and <code>nameCol</code> can be set to the same values as column: BUX and row: 4 in this instance. In both cases, the legend correctly displays the new series name. However, the second example doesn't link the cell to the series name gui edit box. The series name box remains blank.</p>
  
  <p>The first example is not useful to me as I need to represent the cell using variables for the column and row, as this is within an iterative For loop.</p>
  
  <p>Please see below for my full code:</p>
  
  <pre><code>Sub ExtendPlot()
  
  Dim nameRow As Integer
  Dim nameCol As Integer
  Dim maxPlotRow As Integer
  Dim xPlotCol As Integer
  Dim minPlotRow As Integer
  Dim yPlotCol As Integer
  Dim xValues As Range
  Dim yValues As Range
  
  nameRow = 4 'the series name is always on the same row
  minPlotRow = 2 'the minimum plotted row is always 2
  maxPlotRow = 400 'the maximum plotted row is always 400
  nameCol = Sheets("GSI with DSPV Data").Columns("BUX").Column 'specify the column of the series name location and turn this into an integer
  xPlotCol = Sheets("GSI with DSPV Data").Columns("BUY").Column 'specify the column of the series x values location and turn this into an integer
  yPlotCol = Sheets("GSI with DSPV Data").Columns("BUZ").Column 'specify the column of the series y values location and turn this into an integer
  Set xValues = Range(Sheets("GSI with DSPV Data").Cells(minPlotRow, xPlotCol), Sheets("GSI with DSPV Data").Cells(maxPlotRow, xPlotCol)) 'set the range of the x axis given the above values
  Set yValues = Range(Sheets("GSI with DSPV Data").Cells(minPlotRow, yPlotCol), Sheets("GSI with DSPV Data").Cells(maxPlotRow, yPlotCol)) 'set the range of the y axis given the above values
  ActiveChart.SeriesCollection.NewSeries 'create a new series on the current graph
  ActiveChart.FullSeriesCollection(1).Name = "='GSI with DSPV Data'!$BUX$4" 'create the name for the new series by linking to the reference cell
  ActiveChart.FullSeriesCollection(1).xValues = xValues 'create the x axis by linking to the x axis range
  ActiveChart.FullSeriesCollection(1).Values = yValues 'create the y axis by linking to the y axis range
  
  For i = 2 To 30 'start a For loop for the next coming series
  nameCol = nameCol + 8 'the name of the next series is always located 8 columns later than the first
  xPlotCol = xPlotCol + 8 'the x axis values of the next series are always located 8 columns later than the first
  yPlotCol = yPlotCol + 8 'the y axis values of the next series are always located 8 columns later than the first
  Set xValues = Range(Sheets("GSI with DSPV Data").Cells(minPlotRow, xPlotCol), Sheets("GSI with DSPV Data").Cells(maxPlotRow, xPlotCol)) 'set the range of the x axis given the above values
  Set yValues = Range(Sheets("GSI with DSPV Data").Cells(minPlotRow, yPlotCol), Sheets("GSI with DSPV Data").Cells(maxPlotRow, yPlotCol)) 'set the range of the y axis given the above values
  
  ActiveChart.SeriesCollection.NewSeries
  ActiveChart.FullSeriesCollection(i).Name = Worksheets("GSI with DSPV Data").Cells(nameRow, nameCol) 'create the name for the new series by linking to the reference cell
  ActiveChart.FullSeriesCollection(i).xValues = xValues 'create the x axis by linking to the x axis range
  ActiveChart.FullSeriesCollection(i).Values = yValues 'create the y axis by linking to the y axis range
  Next i
  
  End Sub
  </code></pre>
  
  <p>I have used separate ranges for the x axis and y axis on purpose, such that people with zero VBA experience can picture exactly what's going on here. It is not that computational exhaustive (I don't think?) to do this. It just doesn't look very neat.</p>