I wrote a script to periodically copy data from one column depending on if each cell was determined to have current data (Designated as ALIVE in another column), and place that data in another column in a different sheet. The script doesn't exceed the execution time, however I was wondering if there was a way to make it faster by utilizing Arrays.
I appreciate the help, I'm new to Google Apps Script programming but plugging along. Many thanks in advance for the advice.
function copyFunctionDATA() {
var defSheet1 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("(DATA)")
var defSheet2 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("(DATAdead)")
var numLastRow = 60
for (var x=11; x<=numLastRow; x++) {
var srcRange = defSheet1.getRange(x,1);
var srcRange2 = defSheet1.getRange(x,1);
var value = srcRange.getValue();
var value2 = srcRange2.getValue();
if (value2.indexOf("ALIVE") !== -1) {
defSheet2.getRange(x,1).setValue(value);
}
}}