title: VBA MACRO Make Variable Range
body: <p>I really struggled in making this work.</p>
  
  <p>I have below line of code:</p>
  
  <pre><code> ThisWorkbook.Worksheets("Diags").Range("$A1:$Y50000")
  </code></pre>
  
  <p>I am successful if I will convert the last number after $Y as below:</p>
  
  <pre><code> ThisWorkbook.Worksheets("Diags").Range("$A1:$Y" &amp; MyVariable)
  </code></pre>
  
  <p>, but how to integrate also a variable after $A? I tried below but does not work..</p>
  
  <pre><code>ThisWorkbook.Worksheets("Diags").Range("$A1"&amp; MyVariable2":$Y" &amp; MyVariable1)
  </code></pre>
  
  <p>Appreciate your help.
  Thanks, Brandon</p>