Function RecherchePlanG(nom As Range)
Application.Volatile
Dim initiale As String, c As Range, dat As Range, F As Worksheet, P As Range, n As Byte, ordre As Byte, a(1 To 2)
initiale = Application.VLookup(nom, Sheets("COLLEGUES").Columns("A:B"), 2, 0)
Set c = Application.Caller
Set dat = Intersect(c.EntireColumn, nom.Offset(1).EntireRow)
Set F = Sheets("planG")
Set P = F.Columns(Application.Match(dat(1), F.Rows(5), 0)).Resize(, 3)
n = Application.CountIf(P, initiale)
ordre = c.Row - dat.Row
If ordre > n Then RecherchePlanG = "": Exit Function
Set c = P.Cells(1)
For n = 1 To ordre
Set c = P.Find(initiale, c, xlValues, xlWhole)
If n = ordre Then Exit For
Next n
a(1) = F.Cells(c.Row, 1)
a(2) = F.Cells(6, c.Column)
RecherchePlanG = a 'matrice (vecteur horizontal)
End Function