I\'ve found the basic solution https://stackoverflow.com/a/4809413/1438650 but it lacks both the conditional and non-contiguous aspects of my project. I need the the copy to
Blockquote
This is my Coding, I think this would help you.
function GetData() {
var source = SpreadsheetApp.getActiveSpreadsheet();
var target = SpreadsheetApp.openById("0Aj7gIt4f65xidEN1R1lxZksxeFRBYkdHWmVtdE5aOGc");
var lastRow = source.getLastRow();
var source_sheet = source.getSheetByName("Source");
var target_sheet = target.getSheetByName("Target");
var source_range = source_sheet.getDataRange();
var target_range = target_sheet.getDataRange();
var i = 2;
while (i <= lastRow) {
if (source_sheet.getRange("D"+i).getValue() == "Over Due" ) {
var ItemNo = source_sheet.getRange("A"+i).getValue();
var UserName = source_sheet.getRange("B"+i).getValue();
var Location = source_sheet.getRange("C"+i).getValue();
var Status = source_sheet.getRange("D"+i).getValue();
var Comments = source_sheet.getRange("E"+i).getValue();
var data = [ItemNo,UserName,Location,Status,Comments];
target_sheet.appendRow(data);
i++;
} else {
i++;
}
}
}