title: Excel Macro to make new rows with predefined formatting and formula
body: <p>I have an excel sheet with more than 2000 rows.</p>
  
  <p>I use the below macro to add a blank rows with a change in value of cloumn A1.</p>
  
  <pre><code>Sub AddBlankRows()
  '
  Dim iRow As Integer
  Range("a1").Select
  '
  iRow = 1
  '
  Do
  '![enter image description here][1]
  If Cells(iRow + 1, 1) &lt;&gt; Cells(iRow, 1) Then
      Cells(iRow + 1, 1).EntireRow.Insert shift:=xlDown
      iRow = iRow + 2
  Else
      iRow = iRow + 1
  End If
  '
  Loop While Not Cells(iRow, 1).Text = ""
  '
  End Sub
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/2NdTV.jpg" alt="enter image description here"></p>
  
  <p>Is there a way insert the row <em>(same with the above macro)</em> with a fourmula and a predefined formatting?</p>