Another way
If you don't want the first block to have the SUM, remove the "'" at the beginning of
'I = I + 1
'If I <> 1 Then
'End If
Sub sbttls2()
Dim aArea As Range
Dim LR As Long, I As Long
Const WkCol As String = "C"
LR = Range(WkCol & Rows.Count).End(xlUp).Row
For I = LR To 2 Step -1
If (Cells(I, WkCol) <> Cells(I - 1, WkCol)) Then
Cells(I, WkCol).Resize(2, 1).Insert Shift:=xlDown
End If
Next I
LR = Range(WkCol & Rows.Count).End(xlUp).Row
For Each aArea In Range(Cells(1, WkCol), Cells(LR, WkCol)).SpecialCells(xlCellTypeConstants).Areas
'I = I + 1
'If I <> 1 Then
With Cells(aArea.Row + aArea.Rows.Count, WkCol)
.Formula = "=SUM(R[-" & aArea.Rows.Count & "]C:R[-1]C)"
With .Font
.ColorIndex = 5
.Bold = True
End With
End With
'End If
Next aArea
End Sub
Bookmarks