Sub subtotal()
awal = ActiveCell.Row
kol = ActiveCell.Column
akhir = LastRow() + 1
subttl = 0
For n = awal To akhir
Cells(n, kol).Select
subttl = subttl + Cells(n, kol).Value
If Cells(n, kol).Value = "" Then
Selection.Font.Bold = True
Cells(n, kol).Value = subttl
subttl = 0
End If
Next n
End Sub
awal = ActiveCell.Row
kol = ActiveCell.Column
akhir = LastRow() + 1
subttl = 0
For n = awal To akhir
Cells(n, kol).Select
subttl = subttl + Cells(n, kol).Value
If Cells(n, kol).Value = "" Then
Selection.Font.Bold = True
Cells(n, kol).Value = subttl
subttl = 0
End If
Next n
End Sub
Tidak ada komentar:
Posting Komentar