title: VBA how to dump a 2D array into a worksheet Range
body: <p>I'm looking for the <strong>nice and elegant solution</strong> to achieve this working code below. I could NOT find it after many searches and tries, since VBA rationales keep kind of magic for me.</p>
  
  <p>The looping code :</p>
  
  <pre><code>Public Sub Array2Range(My2DArray As Variant, aWS As Worksheet)
  ' Ref : https://stackoverflow.com/questions/6063672/excel-vba-function-to-print-an-array-to-the-workbook
  ' Ref : http://www.ozgrid.com/VBA/sort-array.htm
  ' Ref : https://www.mrexcel.com/forum/excel-questions/14194-vba-arrays-examples-please-how-read-range-th.html
  ' Ref : https://bettersolutions.com/excel/cells-ranges/vba-working-with-arrays.htm
  ' Usage : Array2Range MyArray, aWS
  
    Dim i, j As Integer
    Dim elt As Variant
  
    For i = 1 To UBound(My2DArray) - LBound(My2DArray) + 1
        j = 1
       For Each elt In My2DArray(i)
          aWS.Cells(j, i) = elt
          j = j + 1
        Next elt
    Next i
  
  End Sub
  </code></pre>
  
  <p>The watches window screenshot, to understand the 2D array structure
  <a href="https://i.stack.imgur.com/rT37l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rT37l.png" alt="enter image description here"></a></p>
  
  <p>Thx for your support and ideas.</p>