title: VBA Code to Copy Data from Row 2 to Last Row of Data on One Sheet and Paste to the First Empty Row of Another Sheet
body: <p>I am working with multiple sheets within a workbook. Each sheet has an identical header row. I would like to write a macro to copy a range of data from each sheet (A2:L2 to the last row of data on a sheet) and paste it into the first empty cell in Column A of master sheet.</p>
  
  <p>What I have below doesn't seem to work. Any assistance is appreciated.</p>
  
  <pre><code>Dim Lastrow As Integer
  Lastrow = ActiveSheet.Cells(Rows.Count,1).End(xlUp).Row
  
  Sheets("Master Sheet").Range("A2:L10000).Clear
  
  Sheets("Sheet1").Activate
  Range("A2:L" &amp; Lastrow).Select
  Selection.Copy
  Sheets("Master Sheet").Select
  Range("A30000").Select
  Selection.End(xlUp).Select
  ActiveCell.Offset(1,0).Range("A1").Select
  ActiveSheet.Paste
  
  Sheets("Sheet2").Activate
  Range("A2:L" &amp; Lastrow).Select
  Selection.Copy
  Sheets("Master Sheet").Select
  Range("A30000").Select
  Selection.End(xlUp).Select
  ActiveCell.Offset(1, 0).Range("A1").Select
  ActiveSheet.Paste
  </code></pre>