I have a script that at one point worked great. I added columns, the script stopped working. I finally realized that when I remove these columns it started working again. It appears to only be a problem on the Listing stats tab. However the C2C script does not work when the Listing Stats code is in place- I am guessing since the Listing Stats script is listed first.
(The script is two part. I need to sort two different tabs differently.)
Any thoughts as to why it would stop working with those extra columns added? New to scripts, please talk slowly ;)
DOC HERE (I believe I have set the settings correctly for anyone to see.) https://docs.google.com/spreadsheets/d/175wBQpoGjRkUOIHjI9e056zhQHOwdexPqGNSEaat-cc/edit#gid=499403712
SCRIPT BELOW
function onEdit(){
// -- Listing Stats Tab, sorts by Status (3) then Go Live (15) starting at line 8
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("LISTING STATS");
var lr = ss.getLastRow();
var lc = ss.getLastColumn();
var range = ss.getRange(9, 1, lr - 1, lc)
range.sort([{column: 2},{column: 15}]);
// -- C2C Tab, sorts by Status (2) then Closing (8) starting at line 13
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("C2C");
var lr = ss.getLastRow();
var lc = ss.getLastColumn();
var range = ss.getRange(14, 1, lr - 1, lc)
range.sort([{column: 2},{column: 8}]);
}