title: How do use app-scripts to paste down a formula?
body: <p>Right now I'm able to paste the formula from row X to row Y, however, the calculations in the formulas are the exact same. Say row 1 is A1+B1, the formula for row 5 should be A5+B5, but I'm still getting A1+B1.</p>
  
  <pre><code>for (var x = col; x &lt; lastCol; x++) {
      for (var j = 2; j &lt;= lastRow; j++) {
        var range = sheet.getRange(j,x);
  
        range.setFormula(formulas[0][i]);
      }
      i++;
  }
  </code></pre>
  
  <p>Should I be using another function instead of setFormula or doing something else? I'm iterating over X amount of columns.</p>