https://bugs.freedesktop.org/show_bug.cgi?id=75397

          Priority: medium
            Bug ID: 75397
          Assignee: libreoffice-bugs@lists.freedesktop.org
           Summary: Array formula bug SUM(Len(A2:A200)) adds empty cells
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: elico...@hotmail.com
          Hardware: x86 (IA32)
            Status: UNCONFIRMED
           Version: 4.1.3.2 release
         Component: Spreadsheet
           Product: LibreOffice

In a sheet where the range A2:A200 contain text strings and some are empty, the
array formula
{=SUM(Len(A2:A200))} adds one to the sum for every empty cell.

{=SUM(IF(ISBLANK(A2:A200),0,LEN(A2:K200)))}, however, works correctly - but the
if(isblank()) shouldn't be necessary.

It seems to be more than just the SUM function, as I tried the QUARTILE
function with LEN as an array function and I also got the result 1 when I was
expecting 0. So perhaps any time you do an array function LEN() with empty
cells, LEN gives 1 when it should give 0.

(Needless to say the nonarray variation where you use a range of cells to
perform the same calculation e.g.
=LEN(A2)
=LEN(A3)
=LEN(A4)
=LEN(A5)
...
=LEN(A199)
=LEN(A200)
=SUM(B2:B200)

works fine.

See demonstration of the problem in cell B12 here:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1273659/+attachment/3962696/+files/Array%20Formula%20Bug.ods

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to