title: Google Sheet Copy Row to New Sheet IF Formula Trigger
body: <p>I'm trying to use a pretty standard copy row from one sheet to another sheet code when Column B shows 'Start', but Column B has the following formula in it:</p>
  
  <blockquote>
    <p>=IF(A2 = "Complete","Start","Not Yet")</p>
  </blockquote>
  
  <p>and this code doesn't seem to recognize the formula changing from 'Not Yet' to Start'. Any help would be greatly appreciated. Thanks! </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function onEdit(event) {
    // assumes source data in sheet named Needed
    // target sheet of move to named Acquired
    // test column with yes/no is col 4 or D
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var s = event.source.getActiveSheet();
    var r = event.source.getActiveRange();
  
    if(s.getName() == "Temp" &amp;&amp; r.getColumn() == 1 &amp;&amp; r.getValue() == "Complete") {
      var row = r.getRow();
      var numColumns = s.getLastColumn();
      var targetSheet = ss.getSheetByName("Start");
      var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
      s.getRange(row, 1, 1, numColumns).moveTo(target);
      s.deleteRow(row);
    }
  }</code></pre>
  </div>
  </div>
  </p>