title: VBA : Delete rows using variables
body: <p>I wanted to delete rows from 2 to z (z > 2). I wrote 2 methods but neither worked. I searched for answers but didn't find a solution.</p>
  
  <pre><code>'.Rows("2:" &amp; z).Select  
  .Range(Cells(2, 1), Cells(z, 10)).Select  
  Selection.Delete Shift:=xlUp
  </code></pre>
  
  <p>Thank you in advance.</p>