title: Copying A Formula--And applying it to a new cell range
body: <p>So here's what I am going through. I am using the Excel dll with c# in order to go inside a big and nasty excel sheet so that others don't have to.</p>
  
  <p>We have a formula in one cell that is rather large and we don't want to copy it to every row because of this. This formula uses multiple values on the row that it is placed on. If it is on row 1, it uses lots of cells from that row.</p>
  
  <p>When one copies this formula normally in excel, the new ranges of the cells are modified to reflect the new starting position.</p>
  
  <p>The problem is that when I copy the formula like this, it still gives me all of the values that have to do with the first row instead of the row where I pasted it.....Here is my code:</p>
  
  <pre><code>  sheet.Cells[77][row].Formula = sheet.Cells[77][1].Formula;
  </code></pre>
  
  <p>Can somebody let me know how to make the formula actually apply to the new row instead of row 1?</p>