Bug 55048

Summary: Sorting formula cell become zero
Product: LibreOffice Reporter: Jaise James <jaise>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: jbfaure, pierre-yves.samyn
Priority: medium    
Version: 3.6.2.1 rc   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Test document
before sorting
After sorting

Description Jaise James 2012-09-18 10:55:59 UTC
Created attachment 67321 [details]
Test document

Sorting cell shift cell value changes to zero.
Comment 1 Jaise James 2012-09-18 10:56:44 UTC
Created attachment 67322 [details]
before sorting
Comment 2 Jaise James 2012-09-18 10:57:16 UTC
Created attachment 67323 [details]
After sorting
Comment 3 pierre-yves samyn 2012-09-21 12:52:00 UTC
Hello

Not a bug: Affected cells contain references relative and not absolute.

To obtain the desired result cells D3:D5 must use absolute references. 
Eg D3 = $E$23

A quick way to replace is to select each cell and then press the key combination Shift + F4

Regards
Pierre-Yves
Comment 4 Jaise James 2012-09-21 12:59:34 UTC
thank for info
Comment 5 Jean-Baptiste Faure 2014-10-14 10:03:02 UTC
In fact this bug report ask for the same problem as bug 81309.

It works without using absolute references in version 4.3.4.0.0+ and 4.4.0 alpha but not in versions 4.2.6, 4.1.6 and 4.0.6. Version 4.2.6 gives a result that differ from version 4.1.6 and 4.0.6.
What is surprising me is that it works in 4.4.0 alpha whatever the choice made for the configuration option "Update references when sorting range of cells".

That said I share the decision of Pierre-Yves in comment #3 if we assume that the range A8:E32 is fixed data and the range A1:E5 is the part dedicated to the computations. Even if the range dedicated to data must evolve, for example adding rows in each subpart, then subtotals (currently E14, E23 and E32) will be moved and the references in A1:E5 must be updated accordingly. Even when absolute references are used in A1:E5 they are updated. 

For me still NotABug, the right way is to use absolute references when needed.

Best regards. JBF