I would like to place text inside the first empty row of a specific column. I've tried following the link Faster way to find the first empty row in a Google Sheet column
and I believe that instead of using return
I should use something different as I want to place text inside that column instead of going to that column.
I tried the code to place text but I can only do that for a specific row and column
var sheet = SpreadsheetApp.getActiveSheet();
var cell = sheet.getRange(1,3);
cell.setValue('hello');
How do I implement the above to the code below i.e. once it iterates finish, place text in the first empty row of column C
var sheet = SpreadsheetApp.getActiveSheet();
var column = sheet.getRange('C:C');//specific column
var values = column.getValues();//get all data in that column
var row = 0;
for (var row=0; row<values.length; row++) {
if (!values[row].join("")) break;
}
return ('hello');