|
Sub 按钮1_Click()
r = Cells(Rows.Count, 6).End(3).Row
Application.ScreenUpdating = False
Application.DisplayAlerts = False
sm = 0
For j = r To 3 Step -1
If Cells(j, 7) = Cells(j - 1, 7) Then
sm = sm + Cells(j, 8)
Cells(j - 1, 7).Resize(2).Merge
Cells(j - 1, 12).Resize(2).Merge
Cells(j - 1, 13).Resize(2).Merge
Else
sm = sm + Cells(j, 8)
Cells(j, 13) = sm
sm = 0
End If
If Cells(j, 6) = Cells(j - 1, 6) Then
Cells(j - 1, 6).Resize(2).Merge
End If
Next j
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
|
评分
-
1
查看全部评分
-
|