Sub DumpArray()
Dim ary As Variant
Dim cntRow As Long
Dim cntCol As Long
ary = [{1,"a","1a";2,"b","2b";3,0,"3c";0,"d",0;5,"e","5e"}]
cntRow = UBound(ary, 1) - LBound(ary, 1) + 1
cntCol = UBound(ary, 2) - LBound(ary, 2) + 1
With Range("A1").Resize(cntRow, cntCol)
.Value = ary
.Replace What:="0", Replacement:="", LookAt:=xlWhole
.SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp
End With
End Sub
Sub Write_Partial_Array()
Dim myArray(1 To 10, 1 To 10) As Variant
Dim i As Integer, j As Integer
'Setup A(10,10) array
For i = 1 To 10
For j = 1 To 10
myArray(i, j) = i * j
Next j
Next i
'Write the first 3 Rows & 6 Columns to A1
Worksheets("Sheet1").Range("A1:F3") = myArray
'or Use Resize
'Write the first 8 Rows & 2 Columns to H1
Worksheets("Sheet1").Range("H1").Resize(8, 2) = myArray
End Sub