[Solved] Sorting columns/rows independently

Discuss the spreadsheet application
Post Reply
Sveinn_U
Posts: 2
Joined: Wed Nov 24, 2021 2:16 am

[Solved] Sorting columns/rows independently

Post by Sveinn_U »

I've seen a few posts on here asking about the same thing.
I need to sort my tables in ascending numerical order but it needs to be done separately. The only answers I seem to get for this issue from reading threads by others have been "It's probably quicker for you to do it one at a time than trying to sort it using a macro." And that might have been true for the individual with 360 or so rows of data to sort, but I have 8000.

Here's an example of my data:

2 6 2 3 1
3 3 5 1 1
4 2 5 3 1
6 1 2 3 1


I just need it to look like this:

1 2 2 3 6
1 1 3 3 5
1 2 3 4 5
1 1 2 3 6

I've tried making macros for it, but I can't seem to do that without it sorting only in relation to a specific row (e.g. Row 5) rather than each row being sorted in relation to itself.
What can I do?
Last edited by robleyd on Wed Nov 24, 2021 3:18 am, edited 1 time in total.
Reason: Tag [Solved]
OpenOffice 4.1.7 - Windows 10
FJCC
Moderator
Posts: 9248
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Sorting columns/rows independently

Post by FJCC »

For the example given, you can use the SMALL function as in the attached file.
Attachments
col_sort.ods
(8.46 KiB) Downloaded 140 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Sveinn_U
Posts: 2
Joined: Wed Nov 24, 2021 2:16 am

Re: Sorting columns/rows independently

Post by Sveinn_U »

I can't believe it was something so simple! And to think I was trying to code macros. A thousand thankyou's FJCC! You've saved me hours and hours of needless labour.
OpenOffice 4.1.7 - Windows 10
Post Reply