Bug 90122 - Mix lines in calculations after sorting : big hidden errors
Summary: Mix lines in calculations after sorting : big hidden errors
Status: RESOLVED DUPLICATE of bug 81633
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-20 04:46 UTC by PRX
Modified: 2015-03-20 12:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example with the bug identified: 2 tabs : before and after sorting (59.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-03-20 04:46 UTC, PRX
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PRX 2015-03-20 04:46:46 UTC
Created attachment 114201 [details]
example with the bug identified: 2 tabs : before and after sorting

You make a sheet with calculations per line : 

Ex : before sorting :
in Line 14 ( column N and next): uses cells from line 14
after sorting : 
( and subtotal calculations)
in Line 14 (colum N and next): the formula uses cells from line 21 instead of 14 ! so the calculation and sums are false !!!

I made an example attached that produce the bug : 1st tab: the initial sheet without sorting.
second tab : after sorting. in red : cells with mix-up references in calculations.

The bug is in sorting, I found that by making subtotals (that include the sorting): you can reproduce that bug with a sorting only.
Feel free to ask for more info. 
I tested on Windows and different linux distrib and version : it is since 3.5 (!)
Comment 1 raal 2015-03-20 07:20:31 UTC
Hello,
I sorted on sheet "avant-tri" by column Description. N14=M14-SUM(P14:AA14) after sort.
LO 4.4.1.2, win7.
Please test with newer version, https://www.libreoffice.org/download/libreoffice-fresh/ and let us know.
Comment 2 m_a_riosv 2015-03-20 12:06:11 UTC
From 4.4 there is an option:
Menu/Tools/Options/LibreOffice Calc/General - Update references when sorting range cells.
If I'm not wrong last versions of 4.2, and 4.3 has reverted this behaviour.

For me this is a dup, please if you are not agree reopen it.

*** This bug has been marked as a duplicate of bug 81633 ***
Comment 3 m_a_riosv 2015-03-20 12:49:05 UTC
@PMX answering your pm.

Works fine for me with:
Version: 4.3.6.2 Id.: d50a87b2e514536ed401c18000dad4660b6a169e

You can find all released versions in:
http://downloadarchive.documentfoundation.org/libreoffice/old/