New to Google App Script and trying to write a copy to copy down a formula if the cell is empty. I have code to read the range and return the values. Now how do I write the if statement to copy the cell from the last row with the formula down. I have attached copies of the code, logs, and spreadsheet.
function copytime() {
var activesheet=SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Schedule");
var lr=activesheet.getLastRow()-1;
var rangestart=activesheet.getRange(2,10,lr,5)
var values=rangestart.getValues();
for (var row in values){
for (var col in values[row]){
var rowempty=values[row][col];
Logger.log(rowempty);
// if rowempty==""
}
}
}
