Issue 124448

Summary: OFFSET function don't works with negative height
Product: Calc Reporter: jeffooo <jeffooo>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Minor    
Priority: P3 CC: elish, issues, jeffooo
Version: 4.0.1Keywords: ms_interoperability
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: 4.1.0-beta
Developer Difficulty: ---

Description jeffooo 2014-03-17 14:25:41 UTC
Hi developpers,

In a new speadsheet, in A1:A5, input numeric data 1 to 5.

1) In A6, input formula :
=OFFSET(A5,,,-3)
And matrix validation with Ctrl+Shift+Enter
Expect result : the matrix fonction in C6 return range A3:A5
Result : the matrix fonction return only A5

2) in A6, input formula :
=SUM(OFFSET(A5,,,-3))
and valid with Enter
Expect result : the fonction return 12 (the sum of the range A3:A5)
Result : the fonction return only 5

This OFFSET syntaxe is good in Excel, but not with Calc, we must use :
=OFFSET(A5,-2,,3) with matrix validation
and
=SUM(OFFSET(A5,-2,,3)) with classic validation

Same defect with width parameter

Best regards
Comment 1 Edwin Sharp 2014-03-17 14:43:07 UTC
See:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018434_715980110

=OFFSET(A5;;;-3) is wrong because newWidth > 0 (-3 not allowed).
Comment 2 jeffooo 2014-03-17 14:54:47 UTC
The expected result should then be an error value.

Is that one or the other may be an enhancement ?

For compatibility's reasons with Excel, this issue can it remain open?
(not a DEFECT, but ENHANCEMENT)

Regards
Comment 3 Edwin Sharp 2014-03-17 15:06:16 UTC
Reopened.
Comment 4 Edwin Sharp 2014-03-17 15:08:56 UTC
Confirming for lack of error.
AOO410m14(Build:9760)  -  Rev. 1573062
2014-03-01_04:11:01 - Rev. 1573123
Debian