title: Excel VBA to insert rows based on cell value and copy columns down based on that number
body: <p>I know there are several questions and answers about using Excel VBA to copy and insert rows based on a cell value but I have an additional requirement that makes it difficult to find a solution. I'm stuck at this point and need help.</p>
  
  <p>I have a spreadsheet along the lines of the following:</p>
  
  <pre><code>Name    Unit    Count   Req1    Req2    Req3    Req4    ...  ...    Req25
  Apple   304     5       Apple1  Apple2  Apple3  Apple4  ... Apple5  
  Pear    562     2       Pear1   Pear2                   
  Kiwi    471     4       Kiwi1   Kiwi2   Kiwi3   Kiwi4           
  </code></pre>
  
  <p>The spreadsheet has columns for "Req1" through "Req25." If the"count" is 5, then "Req1" through "Req5" columns will have data. The "count" will vary per row leaving the reminder of the columns to "Req25" blank. I need to insert rows based on "count" -1, copy down all columns up to "count" column, and then move "Req2," "Req3," etc. down to the corresponding inserted row in the "Req1" column. I'm probably not explaining it very well.</p>
  
  <p>I need the end result to look like:</p>
  
  <pre><code>Name    Unit    Count   Req1
  Apple   304     5       Apple1
  Apple   304     5       Apple2
  Apple   304     5       Apple3
  Apple   304     5       Apple4
  Apple   304     5       Apple5
  Pear    562     2       Pear1
  Pear    562     2       Pear2
  Kiwi    471     4       Kiwi1
  Kiwi    471     4       Kiwi2
  Kiwi    471     4       Kiwi3
  Kiwi    471     4       Kiwi4
  </code></pre>
  
  <p>I am able to insert the correct number of rows but I'm stuck on looping through the columns and moving them down into the "Req1" column.</p>
  
  <p>Any help is GREATLY appreciated!! Thanks in advance!</p>