title: Excel VBA - FormulaR1C1
body: <p>I am following formula using VBA Code,</p>
  
  <pre><code>.Range("M2:M" &amp; LastRow).FormulaR1C1 = "=vlookup(RC2 &amp; RC3 &amp; RC6 &amp; RC7,trip_length!A:F,6,False)"
  </code></pre>
  
  <p>But when I see the formula by pressing F2, it shows as below:</p>
  
  <pre><code>=VLOOKUP($B2 &amp; $C2 &amp; $F2 &amp; $G2,trip_length!A:(F),6,FALSE)
  </code></pre>
  
  <p>It's all correct EXCEPT the brackets around F. And because of that, formula returns an Error.</p>
  
  <p>I tried a lot but not able to figure out how to use static range (of another sheet) with FormulaR1C1.</p>
  
  <p>Please help. Thanks.</p>