Bonjour,
Un exemple en VBA sur une classe de 20 élèves :
Option Explicit
Sub Macro1()
Dim i As Long, j As Long, nL As Long
Dim matieres As Byte, total As Single
nL = Cells(Rows.Count, "A").End(xlUp).Row
' Moyennes
For j = 3 To nL
total = 0
matieres = 0
For i = 2 To 5
If Cells(j, i) <> "" Then
total = total + Cells(j, i) * Cells(2, i)
matieres = matieres + Cells(2, i)
End If
Next i
Cells(j, 6) = total / matieres
Next j
End Sub