title: Using variables instead of column names or numbers
body: <p>I'm trying to draw a chart in Excel and here is my code </p>
  
  <pre><code>ActiveSheet.Shapes.AddChart.Select
  ActiveChart.SetSourceData Source:=Range("'ResultHL'!$E:$E")
  ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
  ActiveChart.SeriesCollection.NewSeries
  ActiveChart.SeriesCollection(2).Values = "='ResultHL'!$CB$1:$CB$2520"
  </code></pre>
  
  <p>This is working fine but I'd like t know whether i can assign column names or numbers to some variables and use it in the above code.</p>
  
  <p>In line 2--> <code>ActiveChart.SetSourceData Source:=Range("'ResultHL'!$E:$E")</code>
  i need to assign E to a variable and use it </p>
  
  <p>also in line 5, i need to use an integer variable instead of 2520</p>
  
  <p>How do I do that?</p>