title: VBA copy data from one sheet to another (to the blank cells)
body: <p>I would like to copy data from sheet <code>INV_LEDGERS</code>into <code>Ready to upload</code>sheet, but the sheet <code>Ready to upload</code> already contains some data and therefore I want to loop through the column A in <code>Ready to upload</code> sheet until it will find the blank cell and then paste the data from <code>INV_LEDGERS</code>.</p>
  
  <pre><code>    Sub CopyLedgers()
  
  Dim ws As Worksheet, ws1 As Worksheet
  Dim LastRow As Long
  Set ws = Sheets("INV_LEDGERS")
  Set ws1 = Sheets("Ready to upload")
  
  LastRow = ws.Cells(Rows.Count, 1).End(xlUp).Row
  
  For i = 4 To LastRow
  If ws.Range("A" &amp; i) &gt; "" And ws1.Range("A" &amp; i + 1) = "" Then
      ws.Range("A" &amp; i &amp; ":AE" &amp; i).Copy
      ws1.Range("A" &amp; i + 1).PasteSpecial xlPasteValues
      Application.CutCopyMode = False
  Else
      End If
  Next
  
  End Sub
  </code></pre>
  
  <p>It doesnt show the error msg anymore, but now it copies the data from <code>INV_LEDGERS</code>from the row, where data on sheet <code>Ready to upload</code> ends. I mean, that if data on <code>Ready to upload</code> has the end on row 82, the code will take the data from <code>INV_LEDGERS</code> from 82. row, so basically there are missing 81 rows.</p>
  
  <p>Could you advise me, please?</p>
  
  <p>Thanks a lot!</p>