title: Erase empty cells in an array
body: <p>I paste an array in a column, the problem is that it leaves some cells in the column empty. How can I erase those cells in the column?</p>
  
  <p>This is what I have:</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
      Worksheets("Info").Range("A1").Select
      Dim i As Integer
      Dim iLastRow As Long
      iLastRow = ActiveSheet.Cells(ActiveSheet.Rows.Count, "A").End(xlUp).Row
      Dim arrmatrix() As String
  
       ReDim arrmatrix(1 To iLastRow, 1 To 1)
      For i = 1 To iLastRow
      Range("A2").Cells(i, 1).Select
      If Selection.Offset(0, 11) = "Pi emitida" Then
      arrmatrix(i, 1) = Range("A2").Cells(i, 1).Value
      End If
      Next i
      Worksheets("Inicio").Range("G4:G1000000").ClearContents
  
      Worksheets("Inicio").Range("G4").Resize(UBound(arrmatrix, 1)).Value =     arrmatrix()
  
  end sub
  </code></pre>