I have a range of cell in one sheet I wish copy n times in another sheet: for n=4 one would have:
Input (Sheet1) Output (Sheet2)
ABC ABC
DEF ABC
GHI ABC
ABC
DEF
DEF
DEF
DEF
GHI
GHI
GHI
GHI
What I did is simply:
Sub REPLICATE()
Dim i As Integer
Dim j As Integer
Dim TEMP As String
For i = 1 To 400
TEMP = Workbooks("Libro1").Sheets("Hoja1").Cell(i, 1).Value
For j = 1 To 4
Workbooks("Libro1").Sheets("Hoja2").Cell(j, 1) = TEMP
Next j
Next i
End Sub
And I got the error 438. I thought the problem could have been that I use string, but I tried with simple Integer in my Sheet1, and I've gotten the same problem. Thanks for advices.


