Private Sub CommandButton1_Click()
Dim nN As Long, iI As Long, Clls As Range, Tong1 As Double, Tong2 As Double
nN = [A10000].End(xlUp).Row
For iI = nN To 2 Step -1
If Range("A" & iI).Value <> "" Then Range("A" & iI).EntireRow.Insert
Next iI
nN = [C10000].End(xlUp).Row + 1
Range("A" & nN & ":D" & nN).Borders.LineStyle = xlContinuous
For iI = 1 To nN
If Range("C" & iI) <> "" Then
Tong1 = Tong1 + Range("C" & iI).Value
Tong2 = Tong2 + Range("D" & iI).Value
Else
Range("A" & iI).Value = "Cong:"
Range("C" & iI).Value = Tong1
Range("D" & iI).Value = Tong2
Tong1 = 0: Tong2 = 0
Range("A" & iI & ":D" & iI).Font.Bold = True
End If
Next iI
End Sub