title: Excel VBA: Code to Autofill formula to whatever the length of the column to the left is (so no specified range is required)
body: <p>I'm making a macro whereby I'm trying to autofill a formula, but when I autofill it, in the code it specifies a certain range instead of having code that will generally work if I apply it to a list with more or fewer records in it.  The code currently looks like:</p>
  
  <pre><code>ActiveCell.FormulaR1C1 = "=RC[-3]*RC[-1]"
   Range("S11").Select
  Selection.AutoFill Destination:=ActiveCell.Range("A1:A1846")
  </code></pre>
  
  <p>But I want to make it so that I copy it down to whatever the last row with values on the column to the left, so that instead of copying to A1846 it copies to whatever length depending on the length of the list as a whole?</p>