Function FiltreVBA(tableau, critere(), defaut)
Dim ub1&, ub2%, i&, n&, j%
tableau = tableau
ub1 = UBound(tableau, 1)
ub2 = UBound(tableau, 2)
For i = 1 To ub1
If critere(i, 1) Then
n = n + 1
For j = 1 To ub2
tableau(n, j) = tableau(i, j)
Next j
End If
Next i
For i = n + 1 To ub1
For j = 1 To ub2
tableau(i, j) = defaut
Next j, i
FiltreVBA = tableau 'matrice
End Function