Bug 94959 - SUM formula update incorrect when the sum range is to the last column in spreadsheet and a new column is inserted
Summary: SUM formula update incorrect when the sum range is to the last column in spre...
Status: RESOLVED DUPLICATE of bug 92779
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.6.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-10-11 15:32 UTC by sviatoslav
Modified: 2016-03-24 06:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample spreadsheet (7.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-10-11 15:32 UTC, sviatoslav
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sviatoslav 2015-10-11 15:32:33 UTC
Created attachment 119518 [details]
Sample spreadsheet

When the SUM formula sums columns to the end of the spreadsheet (column AMJ), and when a column is inserted somewhere in the summed range, the formula is not updated correctly with reference to AMJ becoming #REF!.

To reproduce:

1. Open attached sample spreadsheet
2. Insert 1 column anywhere after column D
3. Observe formula in cell D3
Comment 1 raal 2015-10-11 19:11:05 UTC
I can confirm with Version: 5.1.0.0.alpha1+
Build ID: 8273350ff48f198efc9dc9c5de5519b8cbdc0cb3
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-10-07_05:54:26
Comment 2 m_a_riosv 2015-10-11 21:42:22 UTC
I don't think it is a bug, inserting a column(s) all references beyond inserting point must be moved same number of columns than those inserted.

Sorry, but why the last column must be preserved and others not?, for other people can serve to know that the range has been improperly managed.

From recent versions @Eike (https://bugs.documentfoundation.org/show_bug.cgi?id=44419#c17) has implemented the reference to whole columns/rows.

=SUM(1:1) sum all columns of row 1.
=SUM(A:A) sum all rows of column A.

using this references it's possible insert columns without lost the references because it's referred to the whole column/row not to a specific range.
Comment 3 MM 2015-10-11 22:03:06 UTC
Confirmed with v4.2.6.3 under mint 16 x64.
Unconfirmed with v4.1.6.2 under mint 16 x64.

I wouldn't know why it's not a bug. It works in v4.1, but not in v4.2.
At least the outcome shouldn't be: =SUM(D1:#REF!1)
Comment 4 m_a_riosv 2015-10-11 22:41:30 UTC
What it should be?, it signals what part of the reference has been broken.

Seems the behavior was change with the deep rework in calc for 4.2.

Such behavior is an exception on to adapt references when inserting, BTW different than when deleting (4.1).

Maybe would be better as request for enhancement, but even it can make easy certain task, I don't like the exceptions.
Comment 5 MarMar 2015-10-12 11:13:46 UTC
I clearly would classify as bug. For me, the formula =SUM(D1:AMJ1)clearly implies you want to sum all columns between the two references. If one is deleted, there should be one less, if one is inserted it should be automatically added.
Comment 6 sviatoslav 2016-03-24 02:47:22 UTC
It appears this bug was resolved when Bug 92779 was resolved. Please consider marking this a duplicate of Bug 92779.
Comment 7 raal 2016-03-24 06:19:17 UTC
Yes, fixed.

*** This bug has been marked as a duplicate of bug 92779 ***