Hi all, I am trying to make a vba that would apply a array formula to a dynamic range.
In specific I am declaring two dynamic ranges so as to loop to the diffrent sheets and also a LastRow variable that takes the number of rows.
My desired formula is a trendline order 4
Please see my code
Set Selection1 = ActiveSheet.Range("J2:J" & LastRow)
Set Selection2 = ActiveSheet.Range("K2:K" & LastRow)
Range("N3:R3").Select
Selection.FormulaArray = "=LINEST({Selection1},{Selection2}^{1,2,3,4})"
Thank u all in advance!!
Bookmarks