salut
ben je dois faire un dossier avec plusieur fonctions pour la fac mais j'ai un probléme avec ma fonction variance qui bloque


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Function VarianceElementMatrice(n_local_fonc As Integer, p_local_fonc As Integer) As Integer
'Fonction qui calcule la variance des élements de la matrice
 
    Dim j As Integer
    Dim s As Integer
    Dim M As Single
    Dim V As Single
 
    i = 1
    s = 0
 
    While i <= n_local_fonc
       j = 1
       While j <= p_local_fonc
 
           s = s + Worksheets("Feuil1").Range(Chr(67 + j) & 4 + i).Value * Worksheets("Feuil1").Range(Chr(67 + j) & 4 + i).Value
 
            j = j + 1
       Wend
    V = s / (p_local_fonc * n_local_fonc) - M * M
    i = i + 1
 
    VarianceElementMatrice = V
    Wend


je voi pas ou est le probléme
pouriez vous m'aider
merci d'avences