Forum Discussion
AlinaP92
Aug 31, 2021Copper Contributor
How to forecast based on 3/5/7/10 etc. last observations?
Hello everyone. I have two columns of observations: Date and Number of Registrations. My task is to forecast the number of registrations for the remaining days based on 3/5/7/10 last values...
- Aug 31, 2021
Select B23:B32.
Enter the formula
=FORECAST.LINEAR($A$23:$A$32,$B$22:OFFSET($B$22,-$E$2+1,0),$A$22:OFFSET($A$22,-$E$2+1,0))
If you have Microsoft 365, simply press Enter. Otherwise, press Ctrl+Shift+Enter.
HansVogelaar
Sep 01, 2021MVP
OFFSET in fact returns a cell reference. For example, OFFSET(A1,2,0) returns a reference to cell A3.
In most uses, you will get the value of the cell it references to: if you enter the formula =OFFSET(A1,2,0) you will see the value of cell A3, just like when you enter the formula =A3.
But when constructing a range, you are using the cell reference returned by OFFSET.
A1:OFFSET(A1,2,0) is equivalent to A1:A3, not to A1:value_of_A3.
AlinaP92
Sep 01, 2021Copper Contributor
Understood, thank you for the explanation.