title: using variable inside SUMPRODUCT formulaR1C1 for offseting
body: <p>My situation seems to be similar to this one, but net quite exactly the same as I need to use the offset as a variable inside 2 formulas
  <a href="https://stackoverflow.com/questions/18992234/using-variable-inside-formular1c1-for-offseting">using variable inside formulaR1C1 for offseting</a></p>
  <p>Here's something that <strong>works</strong> :</p>
  <pre><code>ActiveCell.FormulaR1C1 = &quot;=SUMPRODUCT((MONTH(R[-188]C[-16]:R[-1]C[-16])=R[5]C[-15])*(R[-188]C:R[-1]C))&quot;
  </code></pre>
  <p>Though, I need to use the Row as a variable <strong>v_LastRow</strong> and this <strong>doesn't work</strong> as I get an execution error 1004 and not sure why</p>
  <pre><code>ActiveCell.FormulaR1C1 = &quot;=SUMPRODUCT((MONTH(R[-v_LastRow]C[-16]:R[-1]C[-16])=R[5]C[-15])*(R[-v_LastRow]C:R[-1]C))&quot;
  </code></pre>
  <p>Any help is much appreciated, thanks !</p>