I am trying to have a function be able to "pick up where it left off" in Google Sheets.
I need to find the last row in a specific column which has data. However:
The sheet has many other columns with even more rows, so I cannot use getLastRow on the Sheet.
I am trying to determine the range to target, so getLastRow will now work at a range level either, as I do not yet have the range.
I cannot array.filter(String), as I am dealing with numeric values.
I can not filter to remove falsy elements (often used to filter blank array values).
Example:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Sheet1");
var range = sheet.getRange(B1:B);
var values = range.getValues(); //Pseudo Array values = [0,0,1,"",""]
var quantityOfValues= values.filter(?????).length //Goal: quantityOfValues== 3
var dataRange = sheet.getRange(1,2,quantityOfValues,1).... // do stuff to this range