I'm Spanish speaking. I tried to record a macro with these instructions for keyboard shortcuts.
First, I select relative references because I need that from my current row. It moves two cells left, copy from this cell to the start of the current row.
Double click left
,
Ctrl shift left
,
Ctrl c
,
Click in the specific sheet
,
Ctrl start
,
Ctrl down
,
Click down
,
Paste only values
,
And save the macro
When I go the Script editor, this is the code that was recorded
function real() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getCurrentCell().offset(0, -2).activate();
var currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.PREVIOUS).activate();
currentCell.activateAsCurrentCell();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Presupuestos'), true);
spreadsheet.getCurrentCell().offset(0, 0).activate();
spreadsheet.getCurrentCell().getNextDataCell(SpreadsheetApp.Direction.DOWN).activate();
spreadsheet.getCurrentCell().offset(1, 0).activate();
spreadsheet.getRange('Correlativos!A2:d2').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
But always paste the same range A2:D2 and I need that copy and paste from column A to column D of my current row.
I always am located in column F of my current row, and I move two cells left because I need to copy the whole range from column A to column D of the current row.
Please, I would appreciate any help.