title: Setting up a dynamic range in excel-vba
body: <p>I'm basing my code off of this.
  <a href="https://stackoverflow.com/questions/12064731/excel-vba-select-a-dynamic-cell-range">Excel VBA - select a dynamic cell range</a></p>
  
  <p>I'm trying to find the syntax to create a dynamic range. Example: I always start on D8 but the  upper bound of the range is based on an int count in another cell. [h4]</p>
  
  <pre><code>Dim count As Integer
  count = Sheet2.Cells(8,1).Value
  Set refRng = Sheet2.Range("D8:" &amp; Cells(8, i).Address)
  </code></pre>
  
  <p>Is the relevant code sample.</p>
  
  <p>I now know that Sheet2.Range("H1") doesn't return an int, it returns a variant or something?</p>
  
  <p>I've tried a million different things and have figured out that none of them work. There has to be a better way to set up a dynamic range.</p>