I hope this will explain what I need: https://docs.google.com/spreadsheets/d/1--4UL1SjdEv-YT-_gTpvKqy9H4SDEdBm8aubFpUZYuw/edit?ts=5be08e3d#gid=0
So here I have B, C, L, M and S information.
I would like to run the script and then row 4-7 gets copied to Notepad tab, and then it sets the value Copied on column T. (as per 2 and 3 row).
Then in a case when Copied is written, the script should skip those and copy only the remaining ones.
Please let me know if still not clear.
Thank you!
function copyInfo() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var copySheet = ss.getSheetByName("Test");
var pasteSheet = ss.getSheetByName("Sheet5");
var columns_to_be_copied = ['B', 'L', 'M', 'V'];
for (column in columns_to_be_copied){
var copy_range_string = columns_to_be_copied[column] + ':' + columns_to_be_copied[column];
// get source range
var source = copySheet.getRange(copy_range_string);
// get destination range
var destination = pasteSheet.getRange(pasteSheet.getLastRow()+1,1,8,4);
// copy values to destination range
copyTo(source,destination );
}
}