title: Copy range until empty row and paste into new sheet
body: <p>I'm trying to write a VBA macro for Excel 2013. It's purpose is to merge two worksheets into a combined worksheet. (I tried to find a built in feature to do this but was unable to find what I needed).</p>
  
  <p>What the macro needs to do is this:</p>
  
  <ol>
  <li><p>Activate "Sheet3" and clear all rows starting with row 3 and down</p></li>
  <li><p>Go into "Sheet1" and copy all rows starting with (A3:P3) and copy down until, and not including, the first row with null in the A column.</p></li>
  <li><p>Go into "Sheet3" and paste those rows starting at A3.</p></li>
  <li><p>Go into "Sheet2" and copy all rows starting with (A3:P3) and copy down until, and not including, the first row with null in the A column.</p></li>
  <li><p>Go into "Sheet3" and past those rows starting at the first empty cell in column A.</p></li>
  </ol>
  
  <p>I'm a novice at VBA but I've managed to find the following code and I'm trying to make it work to accomplish the above requirements.</p>
  
  <pre><code>Sub CreateCombinedSheet()
    lastRow = ActiveSheet.Cells(65536, lastCol).End(xlUp).Row
    ActiveSheet.Range("A3", ActiveSheet.Cells(lastRow, 12)).Copy
  End Sub
  </code></pre>
  
  <p>I'm trying to write parts of it and test it as I go but I'm already getting a 1004 error with this:</p>
  
  <p><code>Application-defined or object-defined error</code></p>
  
  <p>Any thoughts on how I should work this?</p>
  
  <p>Thanks</p>