Im having trouble figuring out what to change in my script to log data on the last row of a specific column. I have two different scripts to log data at different times, but right now they will leave gaps since its identifying the last row of content throughout all columns. Is this a simple change with my script to remove those gaps in the rows?
var sss = SpreadsheetApp.openById('sampleID');
var ss = sss.getSheetByName('Forecast data');
var range = ss.getRange('B126');
const now = new Date();
const data = range.getValues().map(row => row.concat(now));
var tss = SpreadsheetApp.openById('sampleID2');
var ts = tss.getSheetByName('Archived Data');
ts.getRange(ts.getLastRow()+1, 5,1,2).setValues(data);
}