title: VBA Macro to Autofill a cell
body: <p>I am trying to find a simple autofill solution to copy the formula in cell C3 into C2 after a new line has been inserted. Here is what I have that I thought would work:</p>
  
  <pre><code>Sub AutoFill()
      Set SourceRange = Worksheets("Sheet 1").Range("C3")
      Set fillRange = Worksheets("Sheet 1").Range("C2")
      SourceRange.AutoFill Destination:=fillRange
  End Sub
  </code></pre>
  
  <p>Basically, in C3 (and every cell in column C after row 3) has a average function that takes the previous 20 days and creates an average. I am trying to get the macro to input that formula everytime a new row gets put in (I have the code to input the new row it just won't apply the function after the new row comes in)</p>