Bug 118317 - Funtion SUM goes wrong with a $ in the address range
Summary: Funtion SUM goes wrong with a $ in the address range
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-22 11:44 UTC by Fox
Modified: 2018-06-22 12:13 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Example of wrong and expected sum (10.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-06-22 11:44 UTC, Fox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fox 2018-06-22 11:44:12 UTC
Created attachment 143031 [details]
Example of wrong and expected sum

Hello,

Thanks for your work but I've just discovered that function SUM doesn't give the expected result if there's a $ in the data range.

I send you an example.

Many thanks
Comment 1 Mike Kaganski 2018-06-22 12:08:23 UTC
You use wrong syntax to define a range to sum. You need to use =SUM($A$3:A3) in the B3, note the colon (:) between the cell addresses - this defines the range (see https://helponline.libreoffice.org/latest/en-US/text/scalc/guide/relativ_absolut_ref.html ). You used function parameter separator instead (; or , - depends on your settings), which tells SUM to treat the two parameters as individual operands, which must be summed up.

Closing INVALID.
Comment 2 Mike Kaganski 2018-06-22 12:13:37 UTC
See the SUM function reference:https://help.libreoffice.org/6.0/en-US/text/scalc/01/04060106.html#bm_id3163608

> =SUM(A1;A3;B5) calculates the sum of the three cells.
> =SUM(A1:E10) calculates the sum of all cells in the A1 to E10 cell range.