google app script get last row of one column code example
Example: apps script get last row with data
var cur_ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = cur_ss.getDataRange().getValues();
var Avals = cur_ss.getRange("B9:B").getValues();
var Alast = Avals.filter(String).length;
return (Alast + 9);