My code at this point copies the forumla in cells JI104 and I 105 every seven rows down column JI. Is there a way to add to my code to drag the formulas in JI104 to Q104 and JI 105 to AU 104. I need the code to repeat this procedure for the next example JI111 and JI112 and so on..
How can I add this to the code?
Private Sub CopySTDEVCalc() 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") Range("B1").Resize(2, 1).Select Copy Range("JI104").Select Paste i = 104 Do Until shtL.Cells(i + 5, 3) = "" Set rCopy = shtL.Cells(i, 269).Resize(2, 1) If shtL.Cells(i, 3).End(xlDown).Row < 109 Then rCopy.Copy Destination:=shtL.Cells(111, 269) Else rCopy.Copy Destination:=shtL.Cells(i + 7, 269) End If i = i + 7 Loop End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks