Function FiltreVBA(plage As Range, critere(), defaut)
Dim ub1&, ub2%, resu(), i&, n&, j%
ub1 = Application.Caller.Rows.Count
ub2 = Application.Caller.Columns.Count
ReDim resu(1 To ub1, 1 To ub2)
For i = 1 To plage.Rows.Count
If critere(i, 1) Then
If n = ub1 Then Exit For
n = n + 1
For j = 1 To ub2
resu(n, j) = plage(i, j)
Next j
End If
Next i
For i = n + 1 To ub1
For j = 1 To ub2
resu(i, j) = defaut
Next j, i
FiltreVBA = resu 'matrice
End Function