The following code copies data entries in a loop on two seperate worksheets starting in row 5 and then skips every 5 rows to copy the next data entry. Can someone help me change the code to start in row 50 and then skip every 5 rows for the next entry?
Option Explicit
Sub DataForSTDEVCalc()
Dim shtR As Worksheet, shtL As Worksheet, i As Long
Dim shtS As Worksheet
Dim rCopy As Range, rStep3 As Range
Dim pRow As Long
Set shtR = Sheets("Raw Price Data")
Set shtL = Sheets("Raw Price Data Long")
Set shtS = Sheets("Raw Price Data Short")
i = 6
Do Until shtR.Cells(i, 3) = ""
Set rCopy = shtR.Cells(i - 2, 1).Resize(4, 16000)
If shtR.Cells(i, 3) = "Long" Then
rCopy.Copy Destination:=shtL.Cells(shtL.Cells(Rows.Count, 26).End(xlUp).Row, 1)(5)
Else
rCopy.Copy Destination:=shtS.Cells(shtS.Cells(Rows.Count, 26).End(xlUp).Row, 1)(5)
End If
i = i + 5
Loop
End Sub
Bookmarks