title: Looking for help to another onEdit to the original script to include a time stamp generating
body: <p>I have 2 onEdit Script one for the check box to move to different sheet and the other timestamp, I was looking to combine both of them and revise it according to differents requirements</p>
  <p>Check Box Script:</p>
  <pre><code>The requirements when the check box in column 15 is true the data will transfer to AM2 and a check box will created in Column 17 and when the last is true the row will move to sheet Done 
  </code></pre>
  <pre><code>
      function onEdit(event) {
        // assumes source data in sheet named main
        // target sheet of move to named Completed
        // getColumn with check-boxes is currently set to colu 15 or o
        var ss = SpreadsheetApp.getActiveSpreadsheet();
        var s = event.source.getActiveSheet();
        var r = event.source.getActiveRange();
  
        if(s.getName() == &quot;AM1&quot; &amp;&amp; r.getColumn() == 15 &amp;&amp; r.getValue() == true) {
          var row = r.getRow();
          var numColumns = s.getLastColumn();
          var targetSheet = ss.getSheetByName(&quot;AM2&quot;);
          var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
          s.getRange(row, 1, 1, numColumns).moveTo(target);
          s.deleteRow(row);
        } else if(s.getName() == &quot;AM2&quot; &amp;&amp; r.getColumn() == 17 &amp;&amp; r.getValue() == true) {
          var row = r.getRow();
          var numColumns = s.getLastColumn();
          var targetSheet = ss.getSheetByName(&quot;DONE&quot;);
          var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
          s.getRange(row, 1, 1, numColumns).moveTo(target);
          s.deleteRow(row);
        }
      }
  </code></pre>
  <pre><code>the goal from the above timestamp will be generated in sheet AM1 column 14 once column 15 is true and again will be generated in column 16 once column 17 is true   
  </code></pre>
  <p>TimeStamp:</p>
  <pre><code>const onEdit = (e) =&gt; {         
  if(e.range.columnStart === 14 &amp;&amp; e.range.rowStart &gt; 2)         
  {         
  if(e.range.getSheet().getName() === 'AM1' , 'AM2' ) {          
  const oSet = e.range.offset(0,-2)         
  e.value ? oSet.setValue(new Date()) : oSet.clearContent()         
  }         
  }         
  }   
  
  
  
  A sample of the sheet is here : 
  </code></pre>
  <p><a href="https://docs.google.com/spreadsheets/d/1qfkCR5N97CfePTiV8R-RYdyHpPla6KxqxrkN-iDi6IA/edit#gid=417345635" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1qfkCR5N97CfePTiV8R-RYdyHpPla6KxqxrkN-iDi6IA/edit#gid=417345635</a></p>
  <p>looking forwards to your kind help and advice if possible.</p>
  <pre><code>Thanks, 
  Adabsiz
  </code></pre>