Question : google sheets app script get last cell has value with empty cells
Answered by : waleed-ahmed
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName('Sheet1')
const lrow = sh.getLastRow();
const Avals = sh.getRange("A1:A"+lrow).getValues();
const Alast = lrow - Avals.reverse().findIndex(c=>c[0]!='');
Source : https://stackoverflow.com/questions/17632165/determining-the-last-row-in-a-single-column | Last Update : Fri, 20 May 22