title: How can I clear a specific cell when another cell has been cleared?
body: <p>I have a script for Google Docs spreadsheet where, when any cell in a specific column is populated it automatically places a timestamp in a different column on that row:</p>
  
  <pre><code>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() == 9 ) { //checks the column
       var nextCell = r.offset(0, 3);
       if( nextCell.getValue() === '' ) //is empty?
         var time = new Date();
       time = Utilities.formatDate(time, "Canada/Eastern", "M/dd/Y, h:mm:ss");
         nextCell.setValue(time);
     };
   };
  }
  </code></pre>
  
  <p>The script works great. However, I'd like the script to delete that timestamp if said cell has been cleared.</p>
  
  <p>Or perhaps I can put the question a bit differently: How can I clear a specific cell when another specific cell in that row has been cleared?</p>