I have three sheets, one (sheet1) to handle data, one (sheet2) for example what will be pasted and one (sheet3) where this example is pasted.
In sheet one I have list of serial numbers, one per row. This serial number will be broken to cells in same row. In column "M", there will be identification of the product.
Based on this column "M", I would need to copy a range from sheet2 (ie. A3:N8) to sheet3. There are total of 7 different ranges in sheet2, all same sized (6, 14).
This range would be pasted to sheet3 starting from cell A3 to every sixth row (A3.. A9.. A15.. etc.) until the list of serial numbers from sheet1 ends. Also I would need to input cell value from sheet1 column L to every pasted range to cell (1, 3).
This all is activated with command button.
This is what I have so far only to test the function of copying the range to another sheet. It pastes the whole range to column A and to every sixth row.
Private Sub CommandButton1_Click()
Dim i As Long
Dim r As Long
Dim Rng As Range
With Sheets("PACKING LIST EXAMPLES")
Set Rng = .Range("A3:N8")
End With
For i = 2 To Rng.Count * 6 Step 6
r = r + 1
Sheets("PACKING LIST").Range("A" & i).Value = Rng(r).Value
Next i
End Sub
From here I need some help to make this work.
In sheet one I have list of serial numbers, one per row. This serial number will be broken to cells in same row. In column "M", there will be identification of the product.
Based on this column "M", I would need to copy a range from sheet2 (ie. A3:N8) to sheet3. There are total of 7 different ranges in sheet2, all same sized (6, 14).
This range would be pasted to sheet3 starting from cell A3 to every sixth row (A3.. A9.. A15.. etc.) until the list of serial numbers from sheet1 ends. Also I would need to input cell value from sheet1 column L to every pasted range to cell (1, 3).
This all is activated with command button.
This is what I have so far only to test the function of copying the range to another sheet. It pastes the whole range to column A and to every sixth row.
Private Sub CommandButton1_Click()
Dim i As Long
Dim r As Long
Dim Rng As Range
With Sheets("PACKING LIST EXAMPLES")
Set Rng = .Range("A3:N8")
End With
For i = 2 To Rng.Count * 6 Step 6
r = r + 1
Sheets("PACKING LIST").Range("A" & i).Value = Rng(r).Value
Next i
End Sub
From here I need some help to make this work.