I want to copy/paste the values of a specific column into the next column using a trigger at a certain time of the day. The script works when I run it manually, it runs as per 'last run' via trigger but it actually does not copy/paste the values via the trigger (only when I run it manually). Here is the script:
function eoddata() {
var spreadsheet = SpreadsheetApp.getActive();
var targetCell=spreadsheet.getRange('C1');
spreadsheet.getRange('B1:B43').copyTo(targetCell, SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
};
It used to run via trigger but I kept amending the sheet & script. How can I get this trigger to actually do copy/paste the values again pls?
Range.copyTo()
method accepts any range reference and only looks at the top-left cell of the target.