I found the script and have successfully copy values from master sheet to another sheet named "Cooked". The trouble is it copies all the data from master sheet, I just want to copy values from specific columns, like column A,C,D,F(Except B&E) and auto arrange to destination sheet.
My coding exp is limited but I'm able to learn(copy) to understand it from you :)
function copyTo(source,destination) {
var sourceSheet = source.getSheet();
var destSheet = destination.getSheet();
var sourceData = source.getValues();
var dest = destSheet.getRange(
destination.getRow(), // Top row of destination
destination.getColumn(), // left col of destination
sourceData.length, // # rows in source
sourceData[0].length); // # cols in source (elements in first row)
dest.setValues(sourceData);
SpreadsheetApp.flush();
}
function copySheet() {
var sourceSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Total");
var destSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Cooked");
var source = sourceSheet.getRange("A:N");
var destination = destSheet.getRange("A:N");
copyTo(source,destination );
}