title: Increment Cell Ref in Formula for each Cell within a Column
body: <p>Forgive me for my ignorance but I need help with the following code</p>
  
  <pre><code>Sub D3()
  Dim currentRow As String
  Dim sTemp As String
  
  sTemp = Range("D3").Formula 'cell in sheet that needs reference to be increased
  
  Do While (IsNumeric(Right(sTemp, 1)))
  
      currentRow = Right(sTemp, 1) &amp; currentRow
      sTemp = Mid(sTemp, 1, Len(sTemp) - 1)
  
  Loop
  
  currentRow = CLng(currentRow) + 1 'Number to increment cell reference by
  
  Range("D3").Formula = sTemp &amp; currentRow
  
  End Sub
  </code></pre>
  
  <p>As I've forgotten most of my coding and for what I thought was a simple solution I went to google and got the code above. It works excellently on a single cell but I want to be able to update the formula in a range of cells from D3 to D29 and this is where i've become stuck.</p>
  
  <p>I've tried</p>
  
  <pre><code>sTemp = Range("D3:D29").Formula
  </code></pre>
  
  <p>with no luck.</p>
  
  <p>The only way I can currently get what I want is to create 120ish Macros and run them within a Master Macro - which I'm sure you'll agree isn't very efficent.</p>
  
  <p>I want to be able to apply the solution easily to other columns within the sheet.</p>
  
  <p>Thanks</p>