Quote:
Originally Posted by isabelle
hi ginase,
assume that the data is on Sheet1, account numbers are in the range A1:A50 and part numbers in the range B1:B350
the result will be placed on Sheet2
Sub test()
Dim i As Integer, x As String, y As String, n As Integer
For i = 1 To 17500 Step 350
n = n + 1
With Sheets("Sheet2")
Sheets("Sheet1").Range("A" & n).Copy .Range(.Cells(i, 1), .Cells(i + 349, 1))
Sheets("Sheet1").Range("B1:B350").Copy .Range(.Cells(i, 2), .Cells(i + 349, 2))
Application.CutCopyMode = False
End With
Next
End Sub
--
isabelle
-------------------------------------------------------------
|
Dear
Isabelle, Good Morning.
Your code works perfectly. Congratulations.
I tried to adapt this code to a three column of data.
But I´m getting errors.
Please, could you help me with this?
I have three columns of data:
A1:A50 - Music partitures
B1:B20 - Musical instruments
C1:C3 - Participation
50 itens * 20 itens * 3 itens = 3,000 itens
If anyone can help I will apreciate a lot.
I´m a beginner in VBA.
Thanks in advance.
Have a nice day.