title: Find all cells with escaped out formulas '=
body: <p>I have a sheet with a lot of formulas that have been commented or escaped out (not sure which term, if either is accurate) with <code>'=</code>.  I'm now trying to locate and remove the <code>'</code> without any luck.</p>
  <p>I can figure out the re-writing of the formula, it's just the locating of <code>'=</code> where I'm getting hung up.  I'm not really sure what the <code>... == 0)</code> portion of these <code>if</code> statements mean, so that's my first problem.  But I'm sure there is probably an issue with my <code>keyword</code> as well.</p>
  <pre class="lang-javascript prettyprint-override"><code>function resetFormula(sheet, range) {
    formulas = range.getFormulas();
  
    for (var r = 0; r &lt; formulas.length; r++) {
      for (var c = 0; c &lt; formulas[r].length; c++) {
        var formula = formulas[r][c];
        var value = sheet.getRange(r + 1, c + 1).getValue();
        var value = value + &quot;&quot;;
        // var keyword = &quot;'=&quot;; // no results
        // var keyword = &quot;'&quot;; // finds all cells with '.  Not that BEGIN with '
        var keyword = &quot;'\=&quot;; // no results
  
        if (formula.indexOf(keyword) == 0) {
          console.log(&quot;(formula.indexOf(keyword) == 0)&quot;);
          console.log(&quot;formula = &quot; + formula);
          // sheet.getRange(r + 1, c + 1).setFormula(formula);
        } else {
          if (value.indexOf(keyword) == 0) {
            console.log(&quot;(value.indexOf(keyword) == 0)&quot;);
            console.log(&quot;value = &quot; + value);
            // sheet.getRange(r + 1, c + 1).setValue(value);
          }
        }
      }
    }
  }
  </code></pre>