Function Result(colref As Range, ref$, coltxt As Range, txt$, h&)
Dim i&, ligdeb&, n&, a$(), j%
txt = txt & "*"
Result = ""
'---recherche de la 1ère ligne---
For i = Application.Caller.Row To 1 Step -1
If colref(i) = ref Then ligdeb = i: Exit For
Next i
If ligdeb = 0 Then Exit Function
'---recherche des dates---
For i = ligdeb + 1 To ligdeb + h - 1
If IsDate(colref(i)) Then
n = n + 1
ReDim Preserve a(1 To 4, 1 To n)
a(1, n) = Format(colref(i), "dddd dd-mmmm") 'format date à adapter
a(1, n) = UCase(Left(a(1, n), 1)) & Mid(a(1, n), 2)
For j = i - 1 To 1 Step -1
If IsDate(colref(j)) Then Exit For
If coltxt(j) Like txt Then
a(2, n) = coltxt(j)
a(3, n) = coltxt(j, 2)
a(4, n) = coltxt(j, 3)
Exit For
End If
Next j
End If
Next i
If n Then Result = a 'matrice transposée
End Function