Issue 63781 - sort of range containing references to itself: adjust references to new cell containg value referenced prior to sort
Summary: sort of range containing references to itself: adjust references to new cell ...
Alias: None
Product: Calc
Classification: Application
Component: editing (show other issues)
Version: OOo 2.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2006-03-29 21:14 UTC by braedley
Modified: 2013-02-07 22:32 UTC (History)
4 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description braedley 2006-03-29 21:14:50 UTC
When sorting a column of negative numbers (or a combination of positive and
negative numbers), the values will not be sorted properly, and some values may
be changed in the process.
Comment 1 lars 2006-03-29 22:05:54 UTC
cannot reproduce; can you give a step-by-step description? thanks
Comment 2 braedley 2006-03-30 04:33:36 UTC
Occurs when column to be sorted is filled using equations that reference cells
to be sorted, ie. A1=0, A2=A1-5, A3=A1-10 etc, then sorted in ascending order. 
In hindsight, this problem would also exist for just positive numbers as well.
When I first encountered this, I did not realize the column had been entered
this way (as I had imported a friends data from MS:Ex).  The solution to this
would be to record where referenced cells are moved to, and reassign the
references in the refering cell apon completion of the sort.
Comment 3 pmike 2006-03-30 05:27:07 UTC
The problem is due to sorted cell dependency of parent cell.
A1 is greater than A2 and A3, therefore moved to A3.
But links from A2 and old_A3 does not corrected (still refer to A1).
Comment 4 pmike 2006-03-30 05:33:12 UTC
Fix to my previous post: link from cells A2 and old_A3 are corrected.
But as if that cell simply moved N rows up, when N depends on sort.
Comment 5 lars 2006-03-30 12:23:09 UTC
you are right braedley, for this to work properly Calc would have to first sort 
by result and then adjust the cell references to the new cells containing the 
value. this is an enhancement request. probably duplicate but couldn't find it.