title: Excel VBA filldown to last row used in previous column
body: <p>I've been looking all afternoon for the answer to this.</p>
  
  <p>the code works as I want (after lots of time researching, I'm rather green to this) except I'd like to fill down to the last row used in previous column rather than the whole sheet.</p>
  
  <p>I can't give exact referece to the previous column because it isn't always in the same place hence why I am looking it up and doing everything based on that look up result.</p>
  
  <p>All answers I have found use the Range command but I can't find how to use my colNum variable for that.</p>
  
  <pre><code>Sub cndob()
  '
  ' cndob change dob
  '
  ' find column number and select
  '
      Dim colNum As Integer
      colNum = WorksheetFunction.Match("BDate", Range("1:1"), 0)
      Columns(colNum + 1).Select
  
  ' insert column right
  
      Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
  
  ' formula fill down
      Cells(2, colNum + 1).Select
      ActiveCell.FormulaR1C1 = "=RIGHT(RC[-1],2)&amp;CHAR(47)&amp;MID(RC[-1],5,2)&amp;CHAR(47)&amp;LEFT(RC[-1],4)"
      Range(ActiveCell, ActiveCell.End(xlDown)).FillDown
  </code></pre>
  
  <p>Please help</p>