@Phillev: “Offset (A3 ; 0 ; 0 ; 1 ; -3) gives as a result: - {A3} in Calc (v5.3.0.3) - {A1:A3} in Excel”.
This I simply disbelieve. The fifth parameter is the NewWidth in columns also in Excel. It should never produce a range of rows. The behaviour reported for Calc may be fact, but should be considered a bug (see below).
If you want to get access to A1:A3 by OFFSET based on A3 as the reference to start with, you have to use OFFSET(A3;-2;0;3;1)
in Calc. If you want to get what OFFSET(StartRef; ro; co; rs; cs) is claimed to return in Excel even if rs and/or cs are negative generalized in Calc, you have to use
=OFFSET(StartRef; ro+IF(rs>=0;0;rs+1); co+IF(cs>=0;0;cs+1); ABS(rs);ABS(cs))
.
Please note that NewHeight=0 or NewWidth=0 should be considered illegal for any implementation.
Play with this attached example.
In Calc OFFSET should work as specified here.
It is not so easy to find specifications concerning Excel. There should be a spcification for OFFSET, too, but I couldn’t find one, and the help texts offered by support pages are notoriously unreliable.
Thus I only can tell you: OpenFormula does not specify OFFSET in terms allowing for negative values in the fourth and/or the fifth parameter place. If you want to extend a reference “upwards” in rows you have to account for this on the second parameter place, and to work with an expression giving the new height as an absolute amount. That Calc OFFSET does not reject a negative height with an error message but seems to aplly ABS(NegativePseudoHeight)+1
should be considered a bug. For columns/width take the above respectively.