Does anyone know how I can change this line of my code to reference a variable in place of "R172"? I can't use "Range" because I want to use the values in 2 cells far apart from each other.
.Values = "=(ARLSummary!R 4C7,ARLSummary! R172C7)"
.Values = "=(ARLSummary!R 4C7,ARLSummary! R172C7)"
Code:
LChart.Chart.SeriesCollection.Add Source:=Trange With LChart.Chart.SeriesCollection(2) .ChartType = xlXYScatter .XValues = "=(ARLSummary!R4C6,ARLSummary!R172C6)" ' .values = cells(4, 7) .Values = "=(ARLSummary!R4C7,ARLSummary!R172C7)" .Name = "Target" .ErrorBar Direction:=xlX, Include:=xlMinusValues, Type:=xlFixedValue, Amount:=1 End With