title: VBA- variable in a range, inside a formula
body: <p>I have the following code, to calculate the max in a range of cells:</p>
  
  <pre><code> Range("E3").Select
   ActiveCell.FormulaR1C1 = "=MAX(RC[-3]:R[50]C[-3])"
  </code></pre>
  
  <p>How can I replace 50 with a variable in my code?</p>
  
  <p>Thanks for your help!</p>