Tu m'as fait transpiré là, mais je crois que je l'ai...
=SI($C2>0;
INDEX(BASE!$C:$C;PETITE.VALEUR(SI(INDIRECT("BASE!G"&EQUIV(A2;BASE!A:A;0)&":G"&(EQUIV(A2;BASE!A:A;0)+NB.SI(BASE!A:A;A2)-1))=MIN(SI(INDIRECT("BASE!G"&EQUIV(A2;BASE!A:A;0)&":G"&(EQUIV(A2;BASE!A:A;0)+NB.SI(BASE!A:A;A2)-1))>=$C2;INDIRECT("BASE!G"&EQUIV(A2;BASE!A:A;0)&":G"&(EQUIV(A2;BASE!A:A;0)+NB.SI(BASE!A:A;A2)-1))));LIGNE(INDIRECT("BASE!G"&EQUIV(A2;BASE!A:A;0)&":G"&(EQUIV(A2;BASE!A:A;0)+NB.SI(BASE!A:A;A2)-1)));"");ENT(ALEA()*NB.SI(INDIRECT("BASE!G"&EQUIV(A2;BASE!A:A;0)&":G"&(EQUIV(A2;BASE!A:A;0)+NB.SI(BASE!A:A;A2)-1));MIN(SI(INDIRECT("BASE!G"&EQUIV(A2;BASE!A:A;0)&":G"&(EQUIV(A2;BASE!A:A;0)+NB.SI(BASE!A:A;A2)-1))>=$C2;INDIRECT("BASE!G"&EQUIV(A2;BASE!A:A;0)&":G"&(EQUIV(A2;BASE!A:A;0)+NB.SI(BASE!A:A;A2)-1));""))))+1));"")