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 (!)
I sorted on sheet "avant-tri" by column Description. N14=M14-SUM(P14:AA14) after sort.
LO 184.108.40.206, win7.
Please test with newer version, https://www.libreoffice.org/download/libreoffice-fresh/ and let us know.
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 ***
@PMX answering your pm.
Works fine for me with:
Version: 220.127.116.11 Id.: d50a87b2e514536ed401c18000dad4660b6a169e
You can find all released versions in: