title: Excel VBA Loop Rows Until Empty Cell
body: <p>I have an excel document with some plain text in a row. A1:A5 contains text, then several houndred rows down, there's another few rows with text. Cells between are empty. I've set up a <code>Do Until</code> loop which is supposed to copy cells with text, and then stop when an empty cell appears. My loop counts&amp;copies 136 cells includingthe 5 with text. So my question is why? The bottom line: <strong>Hello</strong> ends up on line 136, and then there's a huge gap of empty cells until next area with text. Do the 131 white cells contain any hidden formating causing this? I've tried "Clear Formats" and "Clear All" Code-snippet found below:</p>
  
  <pre><code>Sub CopyTags_Click() 
   Dim assets As Workbook, test As Workbook
   Dim x As Integer, y As Integer
   Set assets = Workbooks.Open("file-path.xlsx")
   Set test = Workbooks.Open("File-path.xlsx")
   x = 1
   y = 1
   Do Until assets.Worksheets(1).Range("A" &amp; x) = ""
      test.Worksheets(1).Range("A" &amp; y) = assets.Worksheets(1).Range("A" &amp; x)
      x = x + 1
      y = y + 1
   Loop
   test.Worksheets(1).Range("A" &amp; x).Value = "Hello"
  End Sub
  </code></pre>
  
  <p>Ive also tried using <code>vbNullString</code> instead of " "</p>