I tried to answer my question on my own with some research. I am pasting my current code below. I am having two problems:
1) The program is pasting the output for i=1289 in all of the rows rather than the output for each integer 1 through 1289 in each row.
2) It runs very slowly, which leads me to believe there is a better way to do this.
Any advice will be much appreciated. If it is easier for someone to help if I upload my spreadsheet, I will do so this evening. Thanks in advance.
Sub STMTRUN()
Dim DataSH As Worksheet, TransferSH As Worksheet, OutSH As Worksheet
Set DataSH = Sheets("Data")
Set TransferSH = Sheets("transfer")
Set OutSH = Sheets("merge")
Dim i As Integer
For i = 1 To 1289
DataSH.Range("A4").Value = i
TransferSH.Range("A2:X2").Copy Destination:=OutSH.UsedRange.Columns(1).Offset(1, 0)
Next i
End Sub
Bookmarks