montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 984
- Office Version
- 2010
- Platform
- Windows
Hi, I am trying to loop the trend formula in my array A1:F21 and go every four rows on the first col, next col etc. and the results on col I, the code I write have something wrong. any advise please.
the array is integers , thanks.
Code:
Option Explicit
Sub subtractone()
Dim i As Integer, j As Integer
For j = 2 To 7
For i = 2 To Cells(Rows.Count, "a").End(xlUp).Row - 1
Cells(i, 7 + j) = "= trend(Cells(i, j))"
Next
Next
End Sub