Trying to create a function where I can copy an entire block of cells depending location of button where script is activated (getting them to select works fine):
spreadsheet.getCurrentCell().offset(-25, -3, 26, 4).activate(); spreadsheet.setCurrentCell(currentCell);
And paste into Q54.
I can only seem to achieve this using absolute values ie:
spreadsheet.getRange('B2:E27').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false); spreadsheet.getRange('Q54').activate();
But B2:E27 will move around depending on where the script runs, thus my problem. Needs to copy relative from where activated:
(-25, -3, 26, 4)