Bug 158524

Summary: Calc can't process equation =SUM(ABS(B4:B15-B19))
Product: LibreOffice Reporter: falsettoggu
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED INVALID    
Severity: normal CC: ilmari.lauhakangas
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Calc file not displaying correct behavior.

Description falsettoggu 2023-12-04 18:49:27 UTC
Created attachment 191233 [details]
Calc file not displaying correct behavior.

LibreOffice Version 7.5.8.2

Calc seems unable to process 

=SUM(B4:B15-B19), or 

=SUM(ABS(B4:B15)), 

or both together: 

=SUM(ABS(B4:B15-B19)). 

I've verified that these equations work in of Microsoft 365.
Comment 1 ady 2023-12-04 19:47:59 UTC
(In reply to falsettoggu from comment #0)
> Created attachment 191233 [details]
> Calc file not displaying correct behavior.
> 
> LibreOffice Version 7.5.8.2
> 
> Calc seems unable to process 
> 
> =SUM(B4:B15-B19), or 

Perhaps you mean to sum the set of values from cell B4 up to cell B15 and then to subtract the value in cell B19. In that case use:

=SUM(B4:B15)-B19

See also:

https://help.libreoffice.org/7.6/en-US/text/scalc/01/04060199.html

> 
> =SUM(ABS(B4:B15)), 
> 
> or both together: 
> 
> =SUM(ABS(B4:B15-B19)). 
> 
> I've verified that these equations work in of Microsoft 365.

Excel 365 is probably using the "post-array formulas era" syntax.

IIRC, the ABS() function expects a numeric value, or a cell with a numeric value. If you want a range as argument, you would need to use it as an array formula/function.

Please go to https://ask.libreoffice.org for questions and leave this site for reporting bugs.