Description: In LbreOffice Calc the sum function when used for a single line only like Sum(C21,C21) doubles the amount of line C21. I don't know why anyone would want to do that, but the function needs to take this possibility into account. Steps to Reproduce: 1.Put 9 in Cell 21 2.Put Sum(C21,C21) in Cell C25 3. Actual Results: 18 Expected Results: 9 Reproducible: Always User Profile Reset: No Additional Info: Function should take into account a user like me, may be stupid enough to use a sum function for one cell. In my case I will at a later date will change the function to include more cells. I know I could just add to include an empty cell and the function would work.
This is completely correct behavior of SUM. It sums whatever you put there. It is exactly like you would write "x+x" and expect the result to be x, not 2x.
I noticed that while Sum(C21,C21) doubles the contents of cell 21, Sum(C21:C21) does not.
(In reply to Don from comment #2) > I noticed that while Sum(C21,C21) doubles the contents of cell 21, > Sum(C21:C21) does not. Indeed. Sum(C21,C21) is a call of SUM with *two* arguments, where each argument is the cell value, identical to "C21+C21"; while Sum(C21:C21) is a call with *one* argument, which is "a range of cells from C21 to C21", which is just a single cell. You simply need to read the basics of spreadsheets: see "Calc Guide" at https://documentation.libreoffice.org/en/english-documentation/.