Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenTue, 23 Sep 2014 11:00:13 +0200When I try to sort my table using column 2 as the basis for sorting in descending order, I get a mixed up hodgepodge of numbers.https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/When I try to sort my table using column 2 as the basis for sorting (in descending order), I get 99 through 52, then 5 , then 42 through 40, then 227 through 131, then 13. What I seek is 227 descending to 0 or at least 1 in regular numeric order. Am I doing something wrong?
(Libre Office 4.2.6-secfix, English, Writer
MAC OS x86-6, English)Mon, 22 Sep 2014 01:26:30 +0200https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/Answer by ROSt52 for <p>When I try to sort my table using column 2 as the basis for sorting (in descending order), I get 99 through 52, then 5 , then 42 through 40, then 227 through 131, then 13. What I seek is 227 descending to 0 or at least 1 in regular numeric order. Am I doing something wrong?
(Libre Office 4.2.6-secfix, English, Writer
MAC OS x86-6, English)</p>
https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?answer=40129#post-id-40129First of all be assured sorting works. I sort often on an XP machine and sometimes on MacBookPro using in both cases LibO 4.2.6.2
I don't know if you are using names for each column and if you have gaps in your table. Therefore what follows should be on the safe side to ensure it works for you as well.
Writer Table:
- select the entire table
- Table > sort > key 1 is checked by default > select column 2 > select key type: numeric > select order: descending > click OK
Calc Table:
- select the entire table
- Data > sort > sort key 1: select your 2nd column > select descending > click OK
If this doesn't work, I assume you have a mismatch of formats, this means that some of the number you see are not only looking like number but are in text format. In this case, make sure that all number like looking cell contents are formated as numbers.
I also recommend to read the free of charge manual, which you can download from here: http://www.libreoffice.org/get-help/documentation/
Mon, 22 Sep 2014 02:36:55 +0200https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?answer=40129#post-id-40129Answer by blindape for <p>When I try to sort my table using column 2 as the basis for sorting (in descending order), I get 99 through 52, then 5 , then 42 through 40, then 227 through 131, then 13. What I seek is 227 descending to 0 or at least 1 in regular numeric order. Am I doing something wrong?
(Libre Office 4.2.6-secfix, English, Writer
MAC OS x86-6, English)</p>
https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?answer=40131#post-id-40131Another check to perform, especially if you are sorting in Calc: Does the column you wish to sort by contain formulas?
If so, after sorting, the cells in the sorted column may end up pointing to different cells than they did before sorting which will then recalculate and the values in the sorted column will no longer be in the desired order.
Cheers,
JohnMon, 22 Sep 2014 04:53:25 +0200https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?answer=40131#post-id-40131Comment by blindape for <p>Another check to perform, especially if you are sorting in Calc: Does the column you wish to sort by contain formulas? </p>
<p>If so, after sorting, the cells in the sorted column may end up pointing to different cells than they did before sorting which will then recalculate and the values in the sorted column will no longer be in the desired order.</p>
<p>Cheers,</p>
<p>John</p>
https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?comment=40194#post-id-40194@ROSt52
Thanks for the feedback.Tue, 23 Sep 2014 11:00:13 +0200https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?comment=40194#post-id-40194Comment by ROSt52 for <p>Another check to perform, especially if you are sorting in Calc: Does the column you wish to sort by contain formulas? </p>
<p>If so, after sorting, the cells in the sorted column may end up pointing to different cells than they did before sorting which will then recalculate and the values in the sorted column will no longer be in the desired order.</p>
<p>Cheers,</p>
<p>John</p>
https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?comment=40136#post-id-40136@blindape - Excellent additional comment! Thanks!Mon, 22 Sep 2014 07:49:36 +0200https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?comment=40136#post-id-40136Answer by Lupp for <p>When I try to sort my table using column 2 as the basis for sorting (in descending order), I get 99 through 52, then 5 , then 42 through 40, then 227 through 131, then 13. What I seek is 227 descending to 0 or at least 1 in regular numeric order. Am I doing something wrong?
(Libre Office 4.2.6-secfix, English, Writer
MAC OS x86-6, English)</p>
https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?answer=40140#post-id-40140While tables in *Writer* also **support the same numeric formats** *Calc* spreadsheets do, **they do not apply a number recognition** automatically in contrast. Thus input numbers are indeed treated as alphanumeric by default if not explicitly formatted otherwise (I don't know a way to change that). **As distinguished from sorting in spreadsheets** ('Data' > 'Sort...') **sorting in text tables** ('Table' > 'Sort') **will offer a choice to treat data either 'Alphanumeric' or 'Numeric'**. 'Alphanumeric' mode will always take the first character as most significant and therefore judge "51" greater than "499". **In 'Numeric' mode text table sorting will apply a type conversion into a standard numerical type in advance** and therefore judge 499 > 51. This will even remain in effect if the forepart of the cell content being recognisable as numeric is followed by alphabetic characters (with or without space).
(As always with "Smart Features" there are more implications than mortals can imagine.)Mon, 22 Sep 2014 11:32:22 +0200https://ask.libreoffice.org/en/question/40127/when-i-try-to-sort-my-table-using-column-2-as-the-basis-for-sorting-in-descending-order-i-get-a-mixed-up-hodgepodge-of-numbers/?answer=40140#post-id-40140