title: Repeating Formula with Incrementing Cell Reference
body: <p>So I have built a formula that has Absolute Cell References, and wanted to repeat the same formula down 3000 cells with each one referencing increment cells. (1st formula referring to Cell $A$1, 2nd formula referring to $A$2) I know that I could easily do this without referencing exact cells and the Fill Handle and this is currently how it's set up, however there's a very large number of people who work in this spreadsheet that have bad Excel manners, and regularly delete rows and cells or copy and paste, which breaks the formulas.</p>
  
  <p>Rather than manually editing the same formula in each cell to change the references from relative to absolute, I was wanting to run a Macro to automatically run the formula for 3000 cells.</p>
  
  <p>I had at first built a Macro that fills 20 cells with the formula, but it didn't adjust the formula based on the active cell. (Always entered with range $A$1:$A$20, and not $A$21:$a$40 when started further down) I changed the Macro to loop, but it looks with all formulas referencing $A$1 rather than updating.</p>
  
  <p>The Macro set up to loop is as follows:</p>
  
  <pre><code>Sub HDDatesRef()
  
  ActiveCell.Select
  ActiveCell.FormulaR1C1 = "=IF(AND(HD!R1C1&gt;0,ISBLANK(HD!R1C4)),HD!R1C1,""n/a"")"
  ActiveCell.Offset(1, 0).Range("A1").Select
  
  Loop Until ActiveCell.Value = ""
  
  End Sub     
  </code></pre>
  
  <p>Any and all help with figuring this out would help immensely. Right now I also have access to Liknedin Learning, so if there's any suggestions for courses on there I should look into so I can understand what I need to do will help with this.</p>