Kodu şu şekilde değiştirdim:
Sub cari_mirac()
Application.ScreenUpdating = False
For i = Range("a65536").End(3).Row To 2 Step -1
If Range("a" & i).Value <> Range("a" & i - 1).Value Then
'Range("a" & i & ":a" & i + 2).EntireRow.Insert
If i = 2 Then i = 0 Else Range("a" & i & ":a" & i + 1).EntireRow.Insert
sat = IIf(Application.CountBlank(Range(Range("c" & i + 3), Range("c" & i + 3).End(4))) > 0, 1, Range("c" & i + 3).End(4).Row - i - 2)
If sat = 1 Then
Range("c" & i + 2).Offset(sat, 0).Formula = "=SUM(R[-" & sat & "]C:R[-1]C)"
Range("b" & i + 2).Offset(sat, 0).Value = "TOPLAM : "
Range("b" & i + 2).Offset(sat, 0).HorizontalAlignment = xlRight
Range("E" & i + 2).Offset(sat, 0).Formula = "=SUM(RC[-2]+RC[-2]*20%)"
Range("E" & i + 2).End(4).Offset(0, 0).Font.Color = 12458
Range("E" & i + 2).End(4).Offset(0, 0).Font.Bold = True
Range("c" & i + 2).End(4).Offset(0, 0).Font.Color = 12458
Range("c" & i + 2).End(4).Offset(0, 0).Font.Bold = True
Range("B" & i + 2).End(4).Offset(0, 0).Font.Color = 12458
Range("B" & i + 2).End(4).Offset(0, 0).Font.Bold = True
Range("E" & i + 2).End(4).Offset(0, 0).Font.Color = 12458
Range("E" & i + 2).End(4).Offset(0, 0).Font.Bold = True
Range("E" & i + 2).End(4).Offset(0, 0).NumberFormat = "#,##0.00"
Else
Range("c" & i + 3).Offset(sat, 0).Formula = "=SUM(R[-" & sat + 1 & "]C:R[-1]C)"
Range("b" & i + 3).Offset(sat, 0).Value = "TOPLAM : "
Range("b" & i + 3).Offset(sat, 0).HorizontalAlignment = xlRight
Range("E" & i + 3).Offset(sat, 0).Formula = "=SUM(RC[-2]+RC[-2]*20%)"
Range("E" & i + 3).End(4).Offset(0, 0).Font.Color = 12458
Range("E" & i + 3).End(4).Offset(0, 0).Font.Bold = True
Range("c" & i + 3).End(4).Offset(0, 0).Font.Color = 12458
Range("c" & i + 3).End(4).Offset(0, 0).Font.Bold = True
Range("B" & i + 3).End(4).Offset(0, 0).Font.Color = 12458
Range("B" & i + 3).End(4).Offset(0, 0).Font.Bold = True
Range("E" & i + 3).End(4).Offset(0, 0).Font.Color = 12458
Range("E" & i + 3).End(4).Offset(0, 0).Font.Bold = True
Range("E" & i + 3).End(4).Offset(0, 0).NumberFormat = "#,##0.00"
End If
End If
Next
'Call ALT_TOPLAM_AL
Application.ScreenUpdating = True
End Sub