[nSLUG] How to sort data within a cell in Calc?

Monte Stevens montestevens at eastlink.ca
Tue Jul 29 22:43:29 ADT 2014

Trina Conrad <trina.hanson79 at gmail.com> writes:

> So I have data in a cell that looks like this:
> 8, 4. 32, 23
> I would like to be able to sort the numbers within the cell to look like:
> 4, 8, 23, 32
> Do this clarify what I am looking to try to do?

Yes, I'm sorry my reading comprehension has deteriotated so.

If your output must be comma-separated lists you could enter the list
elements in separate cells, then sort, then concatenate the separate
cells into a single cell.

  =A1&&", "&&B1&&", "&&C1

To sort horizontally:
Sort dialog
 \_ Options tab
    \_ Direction
       \_ Left to right (sort columns) radio button

If you are unhappy with the result column containing the concatenation

a) copy the formula column
b) go somewhere else
c) paste special -> text + numbers

Since you've already entered the data in the desired format, you could
use the above strategy (assuming you have a single column of
comma-separated lists) after doing the following.

a) select all (or some)
b) kill (copy)
c) yank (paste) into a text editor
d) save as file.csv
e) open file.csv in Calc
f) save as file.ods, file.xlsx....


More information about the nSLUG mailing list