Calc isn't sorting correctly

I have an 18 column by 55 row sheet and I’m trying to sort by one of my headings. When I do so it doesn’t sort all of them. It brings to the top the ones that aren’t sorted.

Attached a portion so it’s easier to understand.image descriptionTest.ods

ViewValue Highlighting (Ctrl+F8) toggles a view mode that allows you to tell which cell has which kind of data (text/numeric/etc). Changing cell format does not convert test to number (even if you set the format to number); so unless you re-enter data having wrong type (this can be done automatically, using Find & Replace, or DataText to Columns), the cells will stay textual. See this FAQ by @erAck.

Finally, that worked. Thanks

To me it looks like you are sorting descending and the values 6,31,…,1 are text cells and 140,111,…,40 are numbers, or some similar mix. Text sorts before numbers when sorting descending.

Doesn’t matter if they’re all set to text or numbers, it still sorts like that. I already tried changing them from one to the another as well as everything from one to the others, same result regardless.

Please attach a test file.

Attached a sample test file taken from the spreadsheet.