I'm exactly one day into writing Google scripts. I've managed to write one that will filter data in a spreadsheet with 24 columns and, for now, about 900 rows. The problem is, it's slow. Any suggestions for how to make this script more efficient? I should note that the script runs slow without the sort or setActiveSelection commands. function open_interventions() {  var ss = SpreadsheetApp.getActiveSpreadsheet();  var sheet = ss.getActiveSheet();  var range = sheet.getDataRange();  var data = range.getValues();  var numRows = range.getNumRows()-1;  range.sort([{column: 2, ascending: false}, {column: 1, ascending: true}]);  for (var i = 2; i <= numRows+1; i++) {    var checkstatus = sheet.getRange(i, 15).getValue();    if (checkstatus == Open) {      sheet.showRows(i);        }    else {      sheet.hideRows(i);  }  }  sheet.setActiveSelection(A1);};
More Efficient Filtering Script
google spreadsheets;google apps script