title: Inserting a specific row multiple times in VBA
body: <p>Our clients want their excel sheets formatted to where a new header (The entire '1' row) to be inserted above the last value whenever a new value in column 'A' is present</p>
  
  <p>Essentially I am copying row '1' and inserting it whenever I find a new value in column 'A'</p>
  
  <p>Here is the sub I am using to format it, but it just keeps looping and crashes.</p>
  
  <pre><code>Sub insertHeader()
  
  Range("A2").Select
  
  Do Until ActiveCell.Value = ""
  
      If ActiveCell.Value = ActiveCell.Offset(1, 0) Then
  
          ActiveCell.Offset.Select
  
      Else
  
          Range("A1").EntireRow.Insert
          ActiveCell.Offset.Select
  
      End If
  
  Loop
  
  End Sub
  </code></pre>