Sub calcul1()
Dim cel As Range, compteur As Long
compteur = 0
For Each cel In Range("B3:B" & Cells(Rows.Count, "B").End(xlUp).Row)
If cel.Value = "Total" Then
cel.Offset(0, 1).Value = compteur
compteur = 0
Else
compteur = compteur + cel.Offset(0, 1).Value
End If
Next
End Sub
Sub calcul2()
Dim i As Long, total As Long
For i = Cells(Rows.Count, "G").End(xlUp).Row To 3 Step -1
If Cells(i, "G").Value = "Total" Then
total = Cells(i, "G").Offset(0, 1).Value
Cells(i, "G").Offset(0, 2).Value = 1
Else
Cells(i, "G").Offset(0, 2).Value = Cells(i, "G").Offset(0, 1).Value / total
End If
Next
End Sub