google sheets get last row of a 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);