title: Changing copy Entire Row to Copy Range based on Quantity
body: <p>I have a macro that goes through a range and copies the row into a second sheet based on a "quantity". I can only make this work if I copy the entire row, I can't get it to work with just a range.              </p>
  
  <pre><code>Public Sub CopyData()
  
  ' This routing will copy rows based on the quantity to a new sheet.
  Dim rngSinglecell As Range
  Dim rngQuantityCells As Range
  Dim intCount As Integer
  
  ' Set this for the range where the Quantity column exists. This works only if there are no empty cells
  Set rngQuantityCells = Range("P29", Range("P29").End(xlDown))
  
  For Each rngSinglecell In rngQuantityCells
      ' Check if this cell actually contains a number
      If IsNumeric(rngSinglecell.Value) Then
          ' Check if the number is greater than 0
          If rngSinglecell.Value &gt; 0 Then
              ' Copy this row as many times as .value
              For intCount = 1 To rngSinglecell.Value
                  ' Copy the row into the next emtpy row in Generate Control Sheet Import
                  Range(rngSinglecell.Address).EntireRow.Copy Destination:=Sheets("Generate Control Sheet Import").Range("A" &amp; Rows.Count).End(xlUp).Offset(1)
                  ' The above line finds the next empty row.
  
              Next
          End If
      End If
  Next
  End Sub
  </code></pre>
  
  <p>Instead of copying the entire Row I need it to copy a A29:G29 rngQuantityCells times (P29), then move onto the next row (A30:G30) and copy that into the next black row rngQuantityCells number of times (P30)</p>