Function MoyenneGlissante(plage1 As Range, plage2 As Range, nval&, Optional exclu$)
Dim i&, n&, s#
For i = plage1.Rows.Count To 1 Step -1
If plage1(i) <> exclu And IsNumeric(CStr(plage2(i))) Then
n = n + 1
s = s + plage2(i)
If n = nval Then MoyenneGlissante = s / nval: Exit Function
End If
Next
MoyenneGlissante = ""
End Function