WordPress Logo PNG File How to SORT multiple columns in Google Sheets

How to SORT multiple columns in Google Sheets

Yesterday I was working on a spreadsheet that needed to SORT items from several different columns. SORT only accepts one argument, and I couldn’t find any examples online about how (or if) you could SORT multiple columns. Maybe this is obvious to everyone else, but it wasn’t to me.

The answer is to put arguments within an array like this one, which shows how to SORT columns from several different spreadsheets. You can even use a function within the array. Just enclose your list in curly braces separated by semicolons:

=SORT({UNIQUE('SpreadsheetA'!K3:K54); UNIQUE(' 
SpreadsheetB'!J3:J54); UNIQUE('SpreadsheetC'!P3:P54); UNIQUE('SpreadSheetA'!Q3:Q54)}) 

Here’s another example, which has multiple unnamed ranges from within a single spreadsheet:

=SORT({A1:A4; B3:B54; C1:C7}) 

Posted by Jenny Smith

I'm Jenny Smith. I blog about life on the 300+ acres of rolling farmland in Northern Virginia where I live. I like tomatoes, all things Star Trek, watercolor, and reading. I spend most days in the garden fighting deer and groundhogs while trying to find my life's meaning. I'm trying to be like Jesus -- emphasis on the trying.