I have a simple script that I am trying to make to sort a specific column, but for some reason the code I've taken directly from the examples online (from the API) is causing an error message:
Cell reference out of range (line 7, file "Code")
My code is as follows:
function Remove_Duplicates() {
var ss = SpreadsheetApp.getActiveSheet();
var row = 2;
var col = 7;
cellStr = ss.getRange(row,col).getValue();
Logger.log(cellStr);
ss.getRange("G2:H100").sort([{column: 1, ascending: true}]);
}