title: EXCEL VBA Skip blank row
body: <pre><code>Private Sub CommandButton1_Click()
  Dim rng As Range
  Dim cell As Variant
  
  Set rng = Range("C8:C12")
  
  For Each cell In rng
      Sheets("Sheet1").Range("A1:H7").Copy Destination:=Sheets("Quantity").Range("XFD4").End(xlToLeft).Offset(-3, 3)
      Sheets("Quantity").Range("XFD1").End(xlToLeft).Offset(0, 1).Value = cell.Offset(1, -1).End(xlUp).Value
      Sheets("Quantity").Range("XFD2").End(xlToLeft).Offset(0, 1).Value = cell.Value
      Sheets("Quantity").Range("XFD3").End(xlToLeft).Offset(0, 1).Value = cell.Offset(0, 1).Value  
  Next
  End Sub
  </code></pre>
  
  <p>What I want to accomplish here is to <code>skip blank cell/row</code>. Because it will copy empty data to the sheet. Is there any method e.g. Not isEmpty or isBlank for this <code>For loop</code>? Thanks in advance.</p>