Sub CalculTotaux()
Dim Tabdata() As Variant
With ActiveSheet
LastLine = .Range("B" & .Rows.Count).End(xlUp).Row + 1
Tabdata = .Range("A2:C" & LastLine).Value
For i = LBound(Tabdata, 1) To UBound(Tabdata, 1)
If Tabdata(i, 1) <> "" Or Tabdata(i, 2) <> "" Then
Total = Total + Tabdata(i, 2)
Else
Tabdata(i, 3) = Total
Total = 0
End If
Next i
Range("A2:C" & LastLine) = Tabdata
End With
End Sub