An all-Writer answer (assuming that text is in a table).
- Add columns B¹ and C, and copy the text to column B:
- Select from cell A2 to the end (click on A2 and press
Ctrl+Shift+End
)
- Copy selected cells (
Ctrl+C
)
- Add two columns after (choose menu
Table
- Insert
- Columns After
or click twice on the Columns After icon)
- Paste copied text in column B (click on cell B1,
Ctrl+V
) (last cell will remain empty)
- Add alternate content in column C and sort table by content in column C:
- Type something in C1 (could be a)
- Select C1:C2 (click on C1 and drag to C2, or, while the cursor is in C1,
Shift+Down Arrow
)
- Copy selected cells C1:C2 (
Ctrl+C
)
- Select following cells in column C (
Ctrl+Shift+End
)
- Paste copied cells (C1:C2) to column C (
Ctrl+V
)
- Select all table (
Ctrl+A
)
- Sort table content by column C (choose menu
Table
- Sort…
, check Key 1, and choose 3
for Column, OK
)
- Delete the rows and column with the now unnecessary text:
- Select rows without content in the third column (scroll down until the middle of the table, click on the last empty cell of column C, press
Ctrl+Shift+Home
)
- Delete rows without content in the third column (choose menu
Table
- Delete
- Rows
, or click on the Delete selected rows icon)
- Delete column C (click on column C, choose menu
Table
- Delete
- Columns
or click on the Delete selected columns icon)
¹ You can see table and cell names in the status bar:
Tested with LibreOffice 6.4.7.2 (x64); OS: Windows 10.0.
Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.
Check the mark ( → ) to the left of the answer that solves your question.
If the answer helped you, you can mark the up arrow () that is on the left (to vote, you need to have karma of at least 5).