title: Copy Formula till data ends
body: <p>What would be the procedure to copy formula in Excel column C till the data ends in Column B in VB.Net.
  I am using this code in VB.Net which writes the formula in cell C2. [I don't have any blank cell in Column A and Column B]</p>
  
  <pre><code>.Range("C2").Formula = "=Sum(A2:B2)"
  </code></pre>
  
  <p>I want to copy formula till the data ends in "column C" or "Column A" from Vb.net. I know the code for VBA(Macro)</p>
  
  <pre><code>Range("C2").Copy Range("C3", Cells(Rows.Count, "B").End(xlUp).Offset (0, 1))
  </code></pre>
  
  <p>Any Suggestions on the VB.Net.....</p>