Consider an Excel sheet with the following values:
A B
--------
1| 1 5
2| 2 8
3| 3 11
Entering the array formula =TREND(B1:B3,A1:A3,A1:A3)
in cells C1:C3 returns {5;8;11}
, as expected. Entering =OFFSET(C1:C3,1,0)
returns {8;11;0}
, also as expected.
However, if I try entering =ROWS(OFFSET(TREND(B1:B3,A1:A3,A1:A3),1,0))
, I get the message, "The formula you typed contains an error". I can't do anything to get it to accept the formula.
Next I created the named ranges "TrendRange" and "TrendFormula" with the formulae =Sheet1!$C$1:$C$3
and =TREND(Sheet1!$B$1:$B$3,Sheet1!$A$1:$A$3,Sheet1!$A$1:$A$3)
, respectively.
Again, =OFFSET(TrendRange,1,0)
gives the correct result but =OFFSET(TrendFormula,1,0)
does not (it results in #VALUE!
).
There is a simple test that seems to always identify when OFFSET will have this issue. If =CELL("address", xxx)
or =AREAS(xxx)
result in #VALUE!
, then the xxx section can't be used in OFFSET.
Is there any way around this? I've tried using LINEST and SLOPE/INTERCEPT instead of TREND, but I get the same result.