Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ar = Sheet1.Range("a65536").End(xlUp).Row + 1
If Target.Count = 1 And Target.Column = 2 Then
If Cells(ar, 2) = "小计" Then
Cells(ar, 11) = "" For j = 8 To ar - 2
Cells(ar, 11) = Cells(ar, 11) + Round((Cells(j, 11) * 0.5), 2) Cells(ar + 1, 11) = 25 * 150 * 1.3 Cells(ar + 2, 11) = Cells(ar, 11) + Cells(ar + 1, 11)
Next
End If
End If
End Sub