Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Giuliano C

macrumors newbie
Original poster
Feb 10, 2020
21
0
I stay trying to sort some words alphabetically on Google Sheet, but I'm able only to column A. I want to try instead on rows.
 
Someone has funded as to do it? it's fine also with another online program or OpenOffice.
 
I try to explain better; I want to sort, not transport.

Sort works only on a column, not on rows.

I've for instance these data;
A C B A
A B C B
C C C B

I want to sort these ranges, but I can do only random on Google Sheet and if I remember fine, also on OpenOffice.

Result should be instead so:

A A B C
A B B C
B C C C
 
Last edited:
Convert columns to rows, take the new columns separately and sort them, put them back into rows and convert them again.
It think this is what you want
table.jpg
 
I've Only column A and need sort rows. Why I should split them on more column for after putting them again on A?
I'm not sure I understand, are you trying to sort the contents inside a cell? I don't think that's possible.
But you can convert the contents into a table and sort that.
 
Exactly. On Google Sheet, we have a random range. This means that we could sort as I want, but I not have found it as do it.
 
It's surely these 2 things, but I not have understood as to do for every column. I've used sort rows and Have tried all two A-Z. I should put a number... 1? ok, sort only all that have a similar situation. I want to sort all rows.
 
@bogdanw invalid row entered.
I am sorry, I do not use Google Sheets and I don't know how to help you with it.
I would use an AppleScript to sort words in a text. This script takes the contents of your clipboard, sorts it and copies the sorted text back into clipboard.
AppleScript:
on simple_sort(my_list)
    set the index_list to {}
    set the sorted_list to {}
    repeat (the number of items in my_list) times
        set the low_item to ""
        repeat with i from 1 to (number of items in my_list)
            if i is not in the index_list then
                set this_item to item i of my_list as text
                if the low_item is "" then
                    set the low_item to this_item
                    set the low_item_index to i
                else if this_item comes before the low_item then
                    set the low_item to this_item
                    set the low_item_index to i
                end if
            end if
        end repeat
        set the end of sorted_list to the low_item
        set the end of the index_list to the low_item_index
    end repeat
    return the sorted_list
end simple_sort
on splitText(theText, theDelimiter)
    set AppleScript's text item delimiters to theDelimiter
    set theTextItems to every text item of theText
    set AppleScript's text item delimiters to " "
    return theTextItems
end splitText
set theText to the clipboard
set the textToSort to splitText(theText, space)
set the clipboard to simple_sort(the textToSort) as text
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.