FormulaR1C1 does not work
<p>I have the following code:</p>

<pre><code>Dim lastrow As Double
Dim lastrowX As String

lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

lastrowX = "X2:X" &amp; lastrow
Range(lastrowX).FormulaR1C1 = "=IF(RC[-4]=RC[-19],RC[-15],"""")"
</code></pre>

<p>The problem is that instead of working formula, it gives me the following:</p>

<pre><code>=IF(RC[-4]=RC[-19],RC[-15],"""")
</code></pre>

<p>Why excel does not want to "convert" RC into reference?</p>