title: Script to add a Time Stamp
body: <p>Good day,</p>
  
  <p>I have created a sheet that I use to track all changes that are made in Operations. I have a script that copies the range of cells and adds it to a registry on another tab. Where I am running into issues is adding the time stamp to the entries. I have used several variations of the following:</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() == 4 ) { //checks the column
        var nextCell = r.offset(0, 1);
        if( nextCell.getValue() === '' ) //is empty?
          nextCell.setValue(new Date());
      }
    }
  }
  </code></pre>
  
  <p>I have not been able to get this to work in this way up to this point but I have been able to get it to work in the instance that I am manually inputting the information into a cell.</p>
  
  <p>Is there a way to get this formula to function assuming that the edit is being done by another script and not manually?</p>
  
  <p>Thanks! </p>