GOOGLE SHEET FORM SUBMISSION AUTO SORT

GOOGLE SHEET FORM SUBMISSION AUTO SORT

Form Submissions: Sort Responses by Timestamp

You can sort responses easily by using a script. Just follow the steps below:

Sample Sheet: HERE

1. Open up the Google Spreadsheet where you are saving your responses and select Tools->Script Editor.

2. Copy and paste the following code in to the Script editor (this script assumes the sheet name is Form Responses 1).

For Descending:

function getSpreadSheet(){

var ss = SpreadsheetApp.getActiveSpreadsheet();

var sheet = ss.getSheetByName("Form Responses 1");

sheet.sort(1, false);

}

For Ascending:

function getSpreadSheet(){

var ss = SpreadsheetApp.getActiveSpreadsheet();

var sheet = ss.getSheetByName("Form Responses 1");

sheet.sort(1);

}

3. Authorize the script to run by clicking on the "Play" button:

4. Set the Trigger. When someone opens the spreadsheet it will automatically sort itself.

  • Click on the trigger icon and select: No triggers set up. Click here to add one now.

  • Set the drop downs just like below. Save the Trigger, exit the Script Editor, and your done!