Newfs_R_Sublime
Board Regular
- Joined
- Jan 20, 2011
- Messages
- 99
Range("Q2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=SUMIFS(Variation!C[-5],Variation!C1,RC11,Variation!C3,RC13,Variation!C4,RC14)"
Range("Q3").Select
ActiveCell.FormulaR1C1 = _
"=SUMIFS(Margin!C[-5],Margin!C1,R[-1]C11,Margin!C3,R[-1]C13,Margin!C4,R[-1]C14)"
Range("Q4").Select
ActiveCell.FormulaR1C1 = "=-1*R[-1]C"
Range("Q2:Q4").Select
Selection.AutoFill Destination:=Range("Q2:AT4"), Type:=xlFillDefault
Range("Q2:AT4").Select
The part of the sumifs that I want to cycle through using the FOR NEXT loop is the row. This starts on row 2 and ends at a row number stored at theLen as long
So this would sit within a
For i= 2 to theLen
Next i
Thank you very much in advance for your help.
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=SUMIFS(Variation!C[-5],Variation!C1,RC11,Variation!C3,RC13,Variation!C4,RC14)"
Range("Q3").Select
ActiveCell.FormulaR1C1 = _
"=SUMIFS(Margin!C[-5],Margin!C1,R[-1]C11,Margin!C3,R[-1]C13,Margin!C4,R[-1]C14)"
Range("Q4").Select
ActiveCell.FormulaR1C1 = "=-1*R[-1]C"
Range("Q2:Q4").Select
Selection.AutoFill Destination:=Range("Q2:AT4"), Type:=xlFillDefault
Range("Q2:AT4").Select
The part of the sumifs that I want to cycle through using the FOR NEXT loop is the row. This starts on row 2 and ends at a row number stored at theLen as long
So this would sit within a
For i= 2 to theLen
Next i
Thank you very much in advance for your help.