Hi guys,
can one of you genius help me with this:
[TABLE="width: 1055"]
<tbody>[TR]
[TD="class: xl65, width: 107"]postalcode[/TD]
[TD="class: xl65, width: 107"]date[/TD]
[TD="class: xl65, width: 92"]shift[/TD]
[TD="class: xl65, width: 107"]bp[/TD]
[TD="class: xl65, width: 107"]destination[/TD]
[TD="class: xl65, width: 107"]uom[/TD]
[TD="class: xl65, width: 107"]cttc[/TD]
[TD="class: xl65, width: 107"]qty[/TD]
[TD="class: xl66, width: 107"]factor*QTY[/TD]
[TD="class: xl66, width: 107"]produits
[/TD]
[/TR]
</tbody>[/TABLE]
h9h2l6 13/07/3016 1 383 Montreal 383 16 8
i would need a VBA code for the entire sheet that:
1. Copy and insert the row below the original one.
2. in the original row add quantity 48 and produit "GF" (colomn I)
3. in the copy row add quantity 12 and produit "CL" (column J)
i have come so far as this.. but my brain has shut down.
any help at all would be so great!!
Sub InsertRows()
Dim I As Long, J As Integer, Nb As Integer
For I = Range("A65536").End(xlUp).Row To 2 Step -1
Nb = 2
For J = 1 To Nb - 1
Rows(I + J).insert xlDown
Rows(I).Copy
Rows(I + J).PasteSpecial '
Next
Next
Range("A1").Select
Application.CutCopyMode = False
End Sub
thanks guys!!
can one of you genius help me with this:
[TABLE="width: 1055"]
<tbody>[TR]
[TD="class: xl65, width: 107"]postalcode[/TD]
[TD="class: xl65, width: 107"]date[/TD]
[TD="class: xl65, width: 92"]shift[/TD]
[TD="class: xl65, width: 107"]bp[/TD]
[TD="class: xl65, width: 107"]destination[/TD]
[TD="class: xl65, width: 107"]uom[/TD]
[TD="class: xl65, width: 107"]cttc[/TD]
[TD="class: xl65, width: 107"]qty[/TD]
[TD="class: xl66, width: 107"]factor*QTY[/TD]
[TD="class: xl66, width: 107"]produits
[/TD]
[/TR]
</tbody>[/TABLE]
h9h2l6 13/07/3016 1 383 Montreal 383 16 8
i would need a VBA code for the entire sheet that:
1. Copy and insert the row below the original one.
2. in the original row add quantity 48 and produit "GF" (colomn I)
3. in the copy row add quantity 12 and produit "CL" (column J)
i have come so far as this.. but my brain has shut down.
any help at all would be so great!!
Sub InsertRows()
Dim I As Long, J As Integer, Nb As Integer
For I = Range("A65536").End(xlUp).Row To 2 Step -1
Nb = 2
For J = 1 To Nb - 1
Rows(I + J).insert xlDown
Rows(I).Copy
Rows(I + J).PasteSpecial '
Next
Next
Range("A1").Select
Application.CutCopyMode = False
End Sub
thanks guys!!