title: How to fill in a dynamic combination of numbers into an array
body: <p>In my Excel worksheet users can enter 1 to 5 rows of data in the form of minimum, maximum and step size values. I want to create an multidimensional array that has all the combinations of the data.</p>
  
  <p>Is there a way to code this in VBA to dynamically size the array and loop through the cell values without knowing how many data items beforehand?</p>
  
  <p>Example data of 3 rows of inputs (can be more or less)</p>
  
  <pre><code>     Min, Max, Step
  </code></pre>
  
  <p>Data 1: 1, 10, 1</p>
  
  <p>Data 2: 10, 50, 10</p>
  
  <p>Data 3: 5, 25, 5</p>
  
  <p>Total combinations is 250 (10 x 5 x 5)</p>
  
  <p>Combo 1: 1, 10, 5</p>
  
  <p>Combo 2: 1, 10, 10</p>
  
  <p>Combo 3: 1, 10, 15</p>
  
  <p>...</p>
  
  <p>Thanks!</p>