Google Sheets: how to sort by text in a cell
January 22, 2022 3:56 PM   Subscribe

I have a Google Sheet with multiple rows and columns and I want to sort by the text in one row but can't figure it out.

So I have about 30 rows and 50 columns. All the data in the columns are numbers except for the top row, which is text in each of the cells. This top row is what I want to use to sort the columns. I want to reorder the columns so that text is alphabetical from left to right.
posted by zardoz to Computers & Internet (2 answers total)
 
Best answer: It's not you being unable to figure it out, it's Sheets being inadequate.

Unlike Excel and Calc and every other spreadsheet in the world, Sheets doesn't have a left-to-right option for sorting existing sheet data in place. Closest you'll get is fudging it with a combination of TRANSPOSE() and SORT() to make a separate, sorted copy of a block of source data.
posted by flabdablet at 4:22 PM on January 22, 2022


Best answer: Two ideas:
1. You could use the transpose function to switch rows and columns into a separate sheet, then copy the whole sheet and paste as values, then use data sort or filters and sort the rows (previously columns) from A to Z; or
2. You could just drag the columns to sort by hand.

Personally, I'd do #1 if I needed to do multiple/varying/continued sorts, and #2 if the sort was a one-time thing. I don't know of any way to sort data in columns instead of rows on Google Sheets; I'll be curious to see if anyone else has a better answer.
posted by ourobouros at 4:24 PM on January 22, 2022


« Older What are the odds sniffles are covid?   |   How to get well-meaning friend to stop spamming me... Newer »
This thread is closed to new comments.