Hi,

Doing a mrp conversion and I need to convert my inventory from a "batch" type (10 units at 40,000 lbs) to individual units (1 unit at 4,000 lbs, but 10 rows) in order to upload into new system. The following thread had code posted that worked perfectly for adding the correct # of rows beneath each line of inventory (+ 1 row to be left blank...), but I still have to copy each line and paste it 10 times (for my example above with 10 units). Column A has my number of units and I have added a simple formula to divide the total weight by the number of units. However, if the code below could be modified to copy the original row based on the number of units in cell A, that would be fantastic.

http://www.excelforum.com/excel-prog...96#post2794896

below is the code from the above cell I have modified to fit my needs. Note: I have a blank line between each unit of inventory after converting to individual units.

Sub InsertCopyRow()

Dim LastNumber As Long: LastNumber = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
While LastNumber >= 2
If Not IsEmpty(ActiveSheet.Range("A" & LastNumber)) Then
Dim NewRows As Long: NewRows = ActiveSheet.Range("A" & LastNumber).Value
Dim InsertIndex As Long: InsertIndex = 1
While InsertIndex <= NewRows
ActiveSheet.Range("A" & LastNumber + 1).EntireRow.Insert
InsertIndex = InsertIndex + 1
Wend
End If
LastNumber = LastNumber - 1
Wend

End Sub

Here is an example of a row as batch inventory:

4 135766 135766-01 100-0.328-1045-SK 19,080 4,770 1045 21/64 2/29/2012

Here is an example of how I need it for individual:

4 135766 135766-01 100-0.328-1045-SK 19,080 4,770 1045 21/64 2/29/2012
4 135766 135766-02 100-0.328-1045-SK 19,080 4,770 1045 21/64 2/29/2012
4 135766 135766-03 100-0.328-1045-SK 19,080 4,770 1045 21/64 2/29/2012
4 135766 135766-04 100-0.328-1045-SK 19,080 4,770 1045 21/64 2/29/2012

any help with this matter would be greatly appreciated.

Thank you.