title: pass an integer variable into vba array formula
body: <p>I am trying to pass integer value to array formula, below is the code:-</p>
  
  <pre><code>cnt = 150
  cnt2 = 10
  Range("H" &amp; cnt2).Select
  
  Selection.FormulaArray = "=INDEX(Input_Sheet!R1C8:R[" &amp; cnt &amp; "]C8,MATCH(1,(backbone_new!RC[-4]=Input_Sheet!R1C2:R[" &amp; cnt &amp; "]C2)*(backbone_new!RC[-3]=Input_Sheet!R1C4:R[" &amp; cnt &amp; "]C4),0))"
  </code></pre>
  
  <p>I am getting below output in spreadsheet :</p>
  
  <pre><code>=INDEX(Input_Sheet!$H$1:$H160,MATCH(1,(backbone_new!D10=Input_Sheet!$B$1:$B160)*(backbone_new!E10=Input_Sheet!$D$1:$D160),0))'
  </code></pre>
  
  <p>Integer cnt value is 150 but I am getting 160 in the formula. Any thoughts?</p>