mozna pomuze tento kod: Sub SECTI()
Dim i As Long
'vlozeni hodnot souctu na radek
For i = 2 To Cells(1, 1).End(xlDown).Row
Cells(i, 4) = Cells(i, 2).Value * Cells(i, 3).Value
Next i
'vlozeni sumarniho radku
Cells(i, 1) = "Celkem"
Cells(i, 4).Formula = "=SUM(" & Cells(2, 4).Address & ":" & Cells(i - 1, 4).Address & ")"
'ohraniceni sumarniho radku
With Range(Cells(i, 1), Cells(i, 4))
.Font.Bold = True
.BorderAround Weight:=xlMedium
End With
End Subcitovat
Dim i As Long
'vlozeni hodnot souctu na radek
For i = 2 To Cells(1, 1).End(xlDown).Row
Cells(i, 4) = Cells(i, 2).Value * Cells(i, 3).Value
Next i
'vlozeni sumarniho radku
Cells(i, 1) = "Celkem"
Cells(i, 4).Formula = "=SUM(" & Cells(2, 4).Address & ":" & Cells(i - 1, 4).Address & ")"
'ohraniceni sumarniho radku
With Range(Cells(i, 1), Cells(i, 4))
.Font.Bold = True
.BorderAround Weight:=xlMedium
End With
End Subcitovat