For A model in Excel I would like to copy and paste data from one sheet in a workbook to the other sheet in the workbook and transpose this data with the usage of a for next loo
I'm a little confused with what exactly you want to do but would this do?:
First code: Not using transpose
Sub Test()
Dim X As Long, Y As Long, Z As Long
Z = 2
For X = 2 To 2420 Step 10
For Y = 2 To 10
Sheets("RME").Cells(Z, Y).Value = Sheets("CME").Cells(X + (Y - 1), 10).Value
Next Y
Z = Z + 1
Next X
End Sub
Second code: Using transpose
Sub Test()
Dim X As Long, Z As Long
Dim RNG1 As Range, RNG2 As Range
Sheets("CME").Activate
Z = 2
For X = 2 To 2420 Step 10
Set RNG1 = Sheets("CME").Range(Cells(X, 10), Cells(X + 9, 10))
Set RNG2 = Sheets("RME").Cells(Z, 2)
RNG1.Copy
RNG2.PasteSpecial Transpose:=True
Z = Z + 1
Next X
Sheets("RME").Activate
End Sub
Note: Copy/Pasting and transpose take much longer to execute on a larger database. To compare the two code examples above: