Arrange lines of text in alphabetical order (writer)

I am having trouble with sorting a list of items alphabetically using the sort function in writer. When I use the function it seems to rearrange the items somewhat but they still aren’t in alphabetical order:

Alphabetical order sorting issue.odt

Please note that each line of text in the list has been separated using shift + enter Which should make the list react as a paragraph for sorting purposes.

1 Like

Hello appreciatethehelp, you could do the following:

1) select the lines of text that you want to be sorted in alphabetical order,
2) choose the menu "Table:Convert:Text to Table..."
3) in the dialog option group "Separate Text At", select the option "Paragraph" and click "OK"
4) select the entire table column, and choose the menu "Table:Sort..."
5) the default sort order is already alphabetical so you can click OK at once,
6) afterwards convert the table back to text lines by choosing the menu "Table:Convert:Table To Text"

Thank you, but that’s a pretty long-winded way of doing it, would much prefer a shorter way.

It works but seems unnecessarily convoluted

Simply select the paragraphs you want to sort and click on Tools | Sort The default settings will possibly be all you need to sort alphabetically ascending.

Bump re comment; again

You have a combination of paragraphs (reverse P symbol) and line breaks in the sample document - you can see this by toggling View | Non-printing Characters.

Sort only works on paragraphs, not lines separated by a line break.

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

1 Like

I tried that and oddly the text was rearranged somewhat but still isn’t in alphabetical order ascending or descending.

I have edited my question, having added an attachment showing the outcome of the list when I performed the following action to sort it:
select whole paragraph, then tools > sort then select ok.

I tried the “help” section in an effort to figure this out but still not sure how to resolve the issue, could you walk me through? That’d be great.

There seems to be no change to your question, nor an attachment. Can you perhaps retry also with a sample of data prior to sorting?
Note also that sort operates on paragraphs, not lines.

Edit: perhaps try a file sharing site like dropbox and post the URL.

The reason the attachment wasn’t added is I was having trouble reopening/editing the question (apparently I needed someone else to do it for me as I couldn’t do it myself due to my karma rating) and had already left my previous comment saying I had edited it, intending to edit it straight after.

Now that I can edit it again I have added the attachment.

Ahh, so I have been doing it the exact wrong way around- using line breaks when I should have used a separate paragraph for each line.
This also explains why part of the list was alphabetized, whereas other parts weren’t.
Good tip about view > non-printing characters too, thanks.

You must convert all text you want to alphabetically sort to a table for what you do above to get the sort to work.