I want to create a function which runs automatically when the spreadsheet is opened. This function will make the selected cell the last cell without text in a certain column. Basically, I don't want to scroll down a lot, so I'm trying to write a script.
Anyway, my spreadsheet, in Columns A-D, will have an equal number of rows with text or more. I want to get the first row in Column E without text. Column F also has a few rows with text.
Here is my code thus far:
function onOpen() {
var ss = SpreadsheetApp.getActive();
var s = ss.getActiveSheet();
var indLastCol = s.getLastColumn()-1;
var indRowWithout = s.getLastRow();
s.setActiveSelection(indRowWithout , indLastCol); // this line is broken.
for (; s.getActiveSelection().getValue() != 'DONE'; indRowWithout--) {};
}