Bug 124643 - Calc - skips existing sum cell if I create a new sum containing the existing cell(using mouse for selecting cells)
Summary: Calc - skips existing sum cell if I create a new sum containing the existing ...
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-10 08:08 UTC by Petr Polacek
Modified: 2024-04-11 14:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sum with existing sum created by using mouse (95.06 KB, image/png)
2019-04-10 08:16 UTC, Petr Polacek
Details
In bottom status line is sum Ok (89.61 KB, image/png)
2019-04-11 08:56 UTC, Petr Polacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Polacek 2019-04-10 08:08:02 UTC
Description:
Hello I'd like to report an issue I'm having
This is what's happening:
When I type numbers into two different cells, select those two + an empty one and click "Sum", I get the sum from those two cells and the result is typed into the third one. This is fine, the problem appears when I try to continue this by typing another number into a cell below the result, select the result, the new cell with a number and an empty cell. Now when I click "Sum" I just get the number from the new cell.
An example to provide a better explanation:
Type 2 in cell A1
Type 2 in cell A2
Select A1, A2 and A3 (A3 is empty, that's where I want my result)
Click on "Sum"
This works fine, I get 4 in cell A3 "=Sum(A1:A2)"
But when I continue:
Type 2 in cell A4
Select A3 to A5
Click "Sum"
And now the number I get in A5 is 2 instead of 6 as it should be "=Sum(A4:A4)" instead of "=Sum(A3:A4)"
I've observed this issue for some time now throughout all versions. It works as expected in Excel, but unfortunately doesn't in Libreoffice.
Any help would be appreciated.

Steps to Reproduce:
Refer to description

Actual Results:
Refer to description

Expected Results:
New sum including existing sum


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Petr Polacek 2019-04-10 08:16:35 UTC
Created attachment 150644 [details]
Sum with existing sum created by using mouse
Comment 2 Oliver Brinzing 2019-04-10 17:04:22 UTC
(In reply to Petr Polacek from comment #0)
> But when I continue:
> Type 2 in cell A4
> Select A3 to A5
> Click "Sum"
> And now the number I get in A5 is 2 instead of 6 as it should be
> "=Sum(A4:A4)" instead of "=Sum(A3:A4)"

reproducible as described
Comment 3 Petr Polacek 2019-04-11 07:37:58 UTC
This bug in Calc is very old and is on all platforms I tested:
LibreOffice & OpenOffice on Windows PC - Intel/AMD (32 bit and 64bit)
LibreOffice & OpenOffice on Linux PC (Centos, Debian) - Intel/AMD (32/64bit)
LibreOffice on Linux - ARM CPU - BananaPi
LibreOffice on PowerMac G5 - MacOS X & Linux (IBM PowerPC CPU)
NeoOffice on PowerMac G5 - MacOS X (IBM PowerPC CPU)
Comment 4 Petr Polacek 2019-04-11 08:56:15 UTC
Created attachment 150687 [details]
In bottom status line is sum Ok
Comment 5 Petr Polacek 2019-04-11 08:58:48 UTC
In bottom status line is sum as I want - second attachement. So the problem is only in automaticky generated formula by clicking on the Sum icon.
Comment 6 b. 2019-04-11 19:13:21 UTC
repro in 

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 35d9a2618dc0116378ab795a7b9277d248c5afd4
CPU threads: 8; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-04-05_04:55:04
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

i think the community needs someone to clean out - fix!, not 'plaster' - all theese old bugs ...
Comment 7 b. 2020-01-24 10:54:36 UTC
just tested, still buggy in 6.4.0.2, 

would be nice if someone with skills and knowledge about the code could care for it, 

perhaps it's quite easy ... as it's only a small 'isolated' functionality to suggest the selected range for the formula, instead of a part of it if it already contains a formula? 

looks as if it fails as well with manually entered formulas as with 'wizard inserted', 

looks as if it fails only with formulas referencing a range, regardless if represented by 'start:end' or enumeration (A1;A2;A3), 

but doesn't fail with distinct summation - 'A1+A2+A3', 

and fails only if one of the formulas (SUM, MIN, MAX, AVERAGE, COUNT) which are offered by the wizard is found into the list of operands, if you have a '=PRODUCT(Xi:Yn)' into the operands they are evaluated correctly, 

reg. 

b.
Comment 8 QA Administrators 2022-01-24 03:34:30 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2024-01-25 03:26:03 UTC Comment hidden (obsolete)
Comment 10 LeroyG 2024-04-05 00:02:50 UTC
Still present:

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 4; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: es-MX (en_US.UTF-8); UI: en-US
Calc: threaded

And 7.5.9.2 on Windows.
Comment 11 Eike Rathke 2024-04-11 14:35:24 UTC
Intended behaviour.
For details see https://bugs.documentfoundation.org/show_bug.cgi?id=149041#c3 and following.