extrobe
2/13/2017 - 11:57 AM

Copy & Paste Between Sheets

Copy & Paste Between Sheets

function CopyAndPaste () {

//the GUID for the file we want to work with
 var ss = SpreadsheetApp.openById("1KE801BupgO1B_aR_PxpqkrfsAY");
  
//Copy & Paste columns Z to AA  
  var source = ss.getRange("Target Customers!AA2:AA")
  var destRange = ss.getRange("Target Customers!AB2:AB");
  source.copyTo (destRange, {contentsOnly: true});
  
//Copy & Paste cols A:Y from target Customers to Day-1  
  var source = ss.getRange ("Target Customers!A:Z");
  var destRange = ss.getRange("Day -1!A:Z");
  source.copyTo (destRange, {contentsOnly: true});
  
}