When I'm working in a Google Spreadsheet, I always use the same routine to perform a sort.

Are there more ways to sort, that lead to Rome?


There are four ways for you to perform a sort. See list below in no particular order:

First (sheet)

Add the build-in filter function, by pressing the funnel and selecting the first row:
enter image description here
Then select the green down arrow in columnA, followed by descending (Z --> A):

enter image description here

Second (sheet)

Use this formula, on another sheet, to perform the sort you want:

=SORT('Build-in SORT'!A2:D,1,0)

Syntax of the sort is: SORT(range, column, sorting order)

Third (sheet)

With the usage of a script, complex sorting is possible as well. This one creates a menu item called Extra, containing an item called Sort:

function onOpen () {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var menu = [{name: "Sort", functionName: "mySort"}];
  ss.addMenu("Extra", menu);

function mySort() {
    .sort({column: 1, ascending: false});

Goto Tools, Script Editor, from the menu and add the script. Make sure to press the two buttons:

enter image description here

Fourth (sheet)

Select column A and choose Data from the menu. Select "Sort sheet by Column A, Z --> A"

enter image description here

Make sure to fix the first row (otherwise the header will join the sort....) !!

Example File

I've prepared the following example file: Four Different Sorts

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.