Reputation: 1
This is my current script which works wonderfully. The range B5:J100 is currently being copied and pasted to the correct position in the sheet. However, the clearContent area must only start from B7:J100. How can I put that in the script?
Update: Can you show me where i have to write this new section? I am complete new to scripts and dont know how to do this.
function copyPaste() {
var ss=SpreadsheetApp.getActive();
var srcsh=ss.getSheetByName('Yard');
var dessh=ss.getSheetByName('History Yard');
var srcrg=srcsh.getRange('B5:J100');
var data=srcrg.getValues();
var desrg=dessh.getRange(dessh.getLastRow() + 1,1,96,9);
desrg.setValues(data);
srcrg.clearContent()
}
Upvotes: 0
Views: 679