I have the below that works perfectly within another script but only returns the first row. The only change I am seeking is for it to copy the data if the rows below are not empty.
Example: It will copy everything from I7, H7, D7 etc... It doesn't copy I8:I24, H8:H24, D8:D24.
Does anyone have an ide a for a simple fix? Would be hugely grateful.
function copyData(){}
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sourceSheet = ss.getSheetByName("Monthly Commission Claim");
var destSheet = ss.getSheetByName("Vans Claimed On");
var dateClaimed = sourceSheet.getRange("I7:I24").getValue();
var salesAdvisor = sourceSheet.getRange("H7:H24").getValue();
var grossProfit = sourceSheet.getRange("D7:D24").getValue();
var stockNumber = sourceSheet.getRange("A7:A24").getValue();
var model = sourceSheet.getRange("B7:B24").getValue();
var year = sourceSheet.getRange("C7:C27").getValue();
var amount = sourceSheet.getRange("L7:L24").getValue();
destSheet.appendRow([dateClaimed, salesAdvisor, grossProfit, stockNumber,
model, year, amount]);