title: Putting a whole row of data into a 2-d array
body: <p>I have a row which recalculates on a each simulation and I want to keep track of all of the values that are calculated. </p>
  
  <p>Currently I save each simulation directly onto the spreadsheet using copy/paste and offsetting in a loop.</p>
  
  <p>I'm trying to switch this so that as the model is run all simulation results are stored in a 2-D vba array rather than on the sheet and then the whole array is printed to excel right at the end. I have little experience in using arrays, so my attempt is:</p>
  
  <pre><code>Dim res() As Variant
  ReDim res (1 To nbSims, 1 To nbLoans)
  For i = 1 to nbSims
      ****Code for calculations of each sim***
      res(i,@@@) = Range(cells("",""),Cells("","")).Value
  Next i
  </code></pre>
  
  <p>Normally if I was filling an array one element at a time I'd use res(i,j) and have it reference one cell, but here I'm trying to take a whole row of results and put it into the array at one time. Any suggestions?</p>
  
  <p>EDIT: I think I've determined that I need find out how to populate an array with a set of arrays, is this possible?</p>