Ask Your Question
0

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. [closed]

asked 2014-09-22 01:26:30 +0200

Plant Person gravatar image

updated 2016-03-03 22:15:41 +0200

Alex Kemp gravatar image

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)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-03 22:15:50.470656

3 Answers

Sort by » oldest newest most voted
1

answered 2014-09-22 04:53:25 +0200

blindape gravatar image

Another 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,

John

edit flag offensive delete link more

Comments

@blindape - Excellent additional comment! Thanks!

ROSt52 gravatar imageROSt52 ( 2014-09-22 07:49:36 +0200 )edit

@ROSt52 Thanks for the feedback.

blindape gravatar imageblindape ( 2014-09-23 11:00:13 +0200 )edit
1

answered 2014-09-22 02:36:55 +0200

ROSt52 gravatar image

updated 2014-09-22 10:14:26 +0200

First 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/d...

edit flag offensive delete link more
0

answered 2014-09-22 11:32:22 +0200

Lupp gravatar image

updated 2014-09-22 11:57:12 +0200

While 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.)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-09-22 01:26:30 +0200

Seen: 1,197 times

Last updated: Sep 22 '14