title: Excel VBA select range at last row and column
body: <p>I'm trying to create a <code>macro</code> that selects the range of last row and last column.</p>
  
  <p>E.g. I want to select 1, 2, 3, 4 from my spreadsheet and then delete the selection.</p>
  
  <p>Data:</p>
  
  <pre><code>John  | 10 | 10 | 10
  Smith | 5  | 5  | 5
  Fred  | 8  | 8  | 8 
  1     | 2  | 3  | 4
  </code></pre>
  
  <p>Here is my code, it only selects the the last row on the A column. (selects 1 and deletes it). I need it to select 1 to 4 and delete the whole row.  </p>
  
  <pre><code>Range("A" &amp; Rows.Count).End(xlUp).Select
  Selection.Delete Shift:=xlUp
  </code></pre>