Good Morning All,
I wrote a script a year and a half/ two years ago. Recently it began to hiccup and now has stopped working completely. I have tried a few things myself but I am a dabbler at best with script.
function onEdit(event) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = event.source.getActiveSheet();
var r = event.source.getActiveRange();
if(s.getName() == "SHEET_A" && r.getColumn() == 20 && r.getValue() == "SENT") {
var row = r.getRow();
var numColumns = s.getLastColumn();
var targetSheet = ss.getSheetByName("SHEET_B");
var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
s.getRange(row, 1, 1, numColumns).moveTo(target);
s.deleteRow(row);
}
}
When SENT is typed, full caps, into the 20th column the row is moved from SHEET_A to SHEET_B. I use this same script on another one of our sheets and it still works with out an issue. Please help me correct any errors I may have introduced or shoot me an explanation on why this started to occur.
I apologize in advance if this has been asked, I did a search and did not find a conversation along these lines. Thank you for everyone's help!