I've created a script that inserts a timestamp based on any update to a specific cell; however I'm trying to insert a timestamp on a specific condition: 'Complete'.Would anyone know how to modify this script?function onEdit() {  var s = SpreadsheetApp.getActiveSheet();  if( s.getName() == Sheet1 ) { //checks that we're on the correct sheet    var r = s.getActiveCell();    if( r.getColumn() == 1 ) { //checks the column       var nextCell = r.offset(0, 1);      //if( nextCell.getValue() !== '' ) //is empty?      nextCell.setValue(new Date()).setNumberFormat('dd-MM-yyyy HH:mm:ss');    }    if( r.getColumn() == 2 ) { //checks the column      var nextCell = r.offset(0, 1);      //if( nextCell.getValue() !== '' ) //is empty?      nextCell.setValue(new Date()).setNumberFormat('dd-MM-yyyy HH:mm:ss');    }    if( r.getColumn() == 3 ) { //checks the column - Complete      var nextCell = r.offset(0, 1);      //if( nextCell.getValue() !== '' ) //is empty?      nextCell.setValue(new Date()).setNumberFormat('dd-MM-yyyy HH:mm:ss');    }  }}
Timestamp based on cell value
google spreadsheets;google apps script