Function Conso3DCond(début, fin, champConso, colCrit, Crit)
Application.Volatile
nlig = Application.Caller.Rows.Count
ncol = Application.Caller.Columns.Count
Dim b(): ReDim b(1 To nlig, 1 To ncol)
n = 0
For s = début To fin
Set f = Sheets(s)
tab1 = f.Range(champConso).Value
For lig = 1 To UBound(tab1)
If tab1(lig, colCrit) = Crit Then
If tab1(lig, 1) <> "" Then
n = n + 1
If n > nlig Then Conso3D = "Pas assez de lignes!": Exit Function
For k = 1 To ncol - 1: b(n, k) = tab1(lig, k): Next k
b(n, k) = Sheets(s).Name
End If
End If
Next lig
Next s
Conso3DCond = b
End Function