starting new thread on new problem I encountered. I have a code below which is intended to copy a range of cells into last empty row on another tab in a sheet. When running I got an error saying target range coordinates exceed sheet dimensions.Can you help me understand what I'm doing wrong here?
function template(){ const ss = SpreadsheetApp.getActiveSpreadsheet(); const sourceSheet = ss.getSheetByName("Sprzedaż template"); const numRows = sourceSheet.getRange("AB84").getValue(); const sourceRange = sourceSheet.getRange("B84:Z84").offset(0,0,numRows); const destinationSheet = ss.getSheetByName("Sprzedaż"); const lastRow = destinationSheet.getLastRow(); sourceRange.copyTo(destinationSheet.getRange(lastRow+1,1),SpreadsheetApp.CopyPasteType.PASTE_VALUES, false); };










