I have 17 columns A to R.
I want to use the TREND function to enter values in column R, starting at row 3.
I have the following code successfully for rows 3 to 39:
sub test()
dim lastforecastmonth as long
lastforecastmonth=cells(rows.count, "A").end(xlup).row
range("R").select
for I=0 to lastforecastmonth-3
activecell.formulaR1C1= "=trend(R3C2:R39C2, R3C5:R39C17, RC[-13]:RC[-17]"
next I
end sub
My problem is that the number of rows can vary.
I would be very grateful if someone could tell me how to do this
Thanks in advance for any help
I want to use the TREND function to enter values in column R, starting at row 3.
I have the following code successfully for rows 3 to 39:
sub test()
dim lastforecastmonth as long
lastforecastmonth=cells(rows.count, "A").end(xlup).row
range("R").select
for I=0 to lastforecastmonth-3
activecell.formulaR1C1= "=trend(R3C2:R39C2, R3C5:R39C17, RC[-13]:RC[-17]"
next I
end sub
My problem is that the number of rows can vary.
I would be very grateful if someone could tell me how to do this
Thanks in advance for any help