title: How to copy the data in last row and copy to the last row of a table in the same worksheet automatically using excel vba?
body: <p>I am trying to find way to <code>select</code> and <code>copy</code> the data from the last row (<em>column F to I</em>) to the last row of the <code>'summary'</code> table (<em>column O to R</em>). </p>
  
  <p>For now this is the code that I found, but it seems that it can paste within the same range of column with different row. </p>
  
  <p>For example, it will copy data <code>F38:I38</code> and paste the data at <code>F40:I40</code>. However, what I want is to copy data from <code>F38:I38</code> and the code will find the last row of the <code>'summary'</code> table and paste the data <code>F38:I38</code> to the last empty row. </p>
  
  <p>Is it possible to target the last two rows of the same worksheet, but different number of cell? Is there any way I can automate this process?</p>
  
  <pre><code>Dim lastRowI As Integer 
  
  lastRowI = ws.Cells(Rows.Count, 6).End(xlUp).Row
  ws.Activate
  ws.Range(Cells(lastRowI, 6), Cells(lastRowI, 9)).Select
  Selection.Copy
  ws.Range(Cells(lastRowI + 2, 6), Cells(lastRowI + 2, 9)).Select
  Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False 
  </code></pre>