Issue 125082

Summary: OFFSET function returns wrong number of rows, if the first cell of external range is empty
Product: Calc Reporter: HD <kg_ooohelp>
Component: editingAssignee: AOO issues mailing list <issues>
Severity: Major    
Priority: P3    
Version: 4.1.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
OFFSET refering external file
referenced file none

Description HD 2014-06-12 01:29:01 UTC
Created attachment 83540 [details]
OFFSET refering external file

1.Load attached 2 files "test1.ods" and "test2.ods"
2.Go to cell "C3" in "test1.ods", OFFSET refers external cell range "B2:B11" in "test2.ods".

[Expected result]
 Formula SUM(OFFSET) should return "54".

[Current result]
 Formula SUM(OFFSET) returns wrong result "44", because "B2" (first cell of range) in "test2.ods" is empty.

 -OFFSET in "C3"
 When the first cell of external range is empty, OFFSET removes a cell from the back of the range.
 -OFFSET in "D4"
 When the first and second cell of external range are empty, OFFSET removes 2 cells from the back of the range.

 Enter "0" in first empty cell of external range.
 OFFSET returns correct range.

 FYI, it works fine in LibreOffice 4.1.6 and 4.2.4

Operating System: Windows 7
Version: Apache OpenOffice 4.1.0, 3.4.1

Comment 1 HD 2014-06-12 01:30:23 UTC
Created attachment 83541 [details]
referenced file
Comment 2 HD 2014-06-12 01:48:04 UTC
Sorry, there is a typo in the Description.

In [Behavior], the cell name must be "D3" not "D4".
Comment 3 mroe 2014-06-19 15:59:44 UTC
see issue 117389

*** This issue has been marked as a duplicate of issue 117389 ***