Function Tableau(ref, source As Range, dest As Range)
'complète les cellules vides en 1ère colonne
Dim ts, ncol%, td(), i&, n, j
ts = Intersect(source, source.Parent.UsedRange)
ncol = dest.Columns.Count
ReDim td(1 To dest.Rows.Count, 1 To ncol)
For i = 2 To UBound(ts)
If ts(i, 1) = "" Then ts(i, 1) = ts(i - 1, 1)
If ts(i, 1) = ref Then
n = n + 1
For j = 1 To ncol
td(n, j) = IIf(ts(i, j + 1) = "", "", ts(i, j + 1))
Next
End If
Next
'---pour éviter les zéros en bas de tableau---
For i = n + 1 To UBound(td)
For j = 1 To ncol
td(i, j) = ""
Next
Next
Tableau = td 'matrice
End Function