My current code only copies the data (coming from the top and leftmost blue table) into a different sheet in the first available row, yet I want it to be copied into the same sheet ("V / MA") and starting at a certain row ("A63:J80") (also identified as the second bottom blue table).
function moveValuesOnly () {
var ss = SpreadsheetApp.getActiveSpreadsheet ();
var source = ss.getRange ("V / MA!A4:J21");
var destSheet = ss.getSheetByName("V / MA results");
// Determine the location of the first empty row.
var destRange = destSheet.getRange(destSheet.getLastRow()+1,1);
source.copyTo (destRange, {contentsOnly: true});
source.clear ();
}
and also another problem I encountered even with this current code, is that the borders get removed and the pasted data does not follow my expected formatting which is specified in the table the data gets pasted.
This script is supposed to get triggered at the click of a button I have already created. It copies data from a table ("A4:J21")(top and left-most blue table).
The two tables have identical formatting and borders, so please advise me on how I should change my code, and how I can stop the borders from getting cleared as well.