| Summary: | CountIf, SUM, SUMSQ function (and others?) do not count last non-empty cell in external file range with preceding empty cell | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Midiar <tor> |
| Component: | Calc | Assignee: | Kohei Yoshida <kohei> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | keyg.hu, LibreOffice, villeroy |
| Priority: | medium | ||
| Version: | 3.4.2 release | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | target:3.5 target:3.4.5 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | Sample files data.ods and formula.ods | ||
Also tried the files in 3.4.2 on Win7, with the same result. *** Bug 40652 has been marked as a duplicate of this bug. *** OS and Status due to Bug 40652 I did some further tests, it seems that it's a general "calculate external range" problem. @Markus: can you proceed? Please feel free to reassign (or reset Assignee to default) if it’s not your area. Please set Status to ASSIGNED if you accept this Bug. *** Bug 41504 has been marked as a duplicate of this bug. *** I'll try to find some time after Paris. I'm taking a look at this. Ah, I see what's wrong indeed. Luckily this is a trivial fix. fixed on master. http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d02007469d84b248bb623196cca95d431f7ed11 The fix has been backported to the 3-4 branch. The fix should appear in 3.4.5. |
Created attachment 50243 [details] Sample files data.ods and formula.ods The CountIf function will miss the last non-empty cell in the data range, if 2 conditions are met: 1. The data range must be in an external file. 2. The data range must be "irregular", in that for example the first cell in the data range is empty. I have enclosed 2 sample files data.ods and formula.ods. Formula.ods contains 4 columns with CountIf functions. The J2 cell gets a 0, but it should be 1, like the rest. Its data range is in data.ods, in D1:D65536 - and D1 in that file is empty, confusing the CountIf function.