After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 312120 - Named range formulas are defunct after deleting a row
Named range formulas are defunct after deleting a row
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
1.4.x
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-07-31 07:39 UTC by Jay Haley
Modified: 2007-11-21 03:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jay Haley 2005-07-31 07:39:52 UTC
Please describe the problem:
Named ranges are a covenient way to define spreadsheet data. The range name can
then be used as part of a formula. In Gnumeric, deleting a row or column from a
named range can render all the formulas based on the range defunct. The #REF!
error replaces all results based on the named range.

Excel handles this without a problem. The range is redefined to account for the
deleted cells, and formulas that depend on the remaining data continue to work.

Steps to reproduce:
1. Create two columns of numbers, and name them "range1" and "range2".
2. Create a third column with the formula "range1+range2" in every cell.
3. Delete any row that transects the three columns.


Actual results:
Cells in the third column (with the formula) show the sum of the range1 and
range2 cells in the same row. Deleting any row that contains cells from the
named ranges causes all the cells in column three to display "#REF!".

Expected results:
The named ranges should continue to be defined even if some of the cells within
them are deleted. Any formulas that depend on named data should continue to
work, as long as the actual data isn't deleted.

Does this happen every time?
Yes.

Other information:
Nope.
Comment 1 Morten Welinder 2005-07-31 22:47:45 UTC
See also bug 123649.
Comment 2 Oliver Burnett-Hall 2007-11-19 23:13:27 UTC
I've managed to replicate this bug in svn trunk, but not consistently.  Most times deleting the cells works as expected.  Other times you get the #REF! error.

When the error occurs what seems to have happened is that the range has been redefined incorrectly; for example if range1 was $A$1:$A$6 and row 4 is deleted it sometimes gets set to $A$1:$A$4 instead of $A$1:$A$5.  This gives the #REF! error in any cell that is referencing the $A$5 bit of the range is it is actually outside the range now.

This may be related to bug 498347; if you get the #REF! error and undo and redo the cell deletion then gnumeric will crash.
Comment 3 Jody Goldberg 2007-11-20 12:55:34 UTC
So you have a named expression "FOO" with value "$A$1:$A$6" that sometimes gets handled incorrectly ?
Comment 4 Morten Welinder 2007-11-21 03:18:30 UTC
Believed fixed together with the problem in bug 498347.