Voilà avec la fonction BYROW/LAMDA :
En E2 :
=byrow(query(A2:A;"select A where A is not null ");lambda(ref;{unique(IFERROR(query(query({'Complément'!A2:J990};"select Col4, Col5, Col6 where Col1 like '"&ref&"' and Col10 like 1 ");"select Col1, Col2 ");"Aucun"))\IFERROR(map(unique(query(query({'Complément'!A2:J990};"select Col4, Col5, Col6 where Col1 like '"&ref&"' and Col10 like 1 ");"select Col1 "));unique(query(query({'Complément'!A2:J990};"select Col4, Col5, Col6 where Col1 like '"&ref&"' and Col10 like 1 ");"select Col2 "));lambda(m;n;(transpose(query({'Complément'!A2:J990};"select Col6 where Col1 like '"&ref&"' and Col4 = '"&m&"' and Col5 = '"&n&"' and Col10 like 1 "))))))}))
En I2 :
=byrow(query(A2:A;" select A where A is not null ");lambda(a;{unique(IFERROR(query(query({'Complément'!$A$2:$J$992};"select Col4, Col5, Col6 where Col1 like '"&a&"' and Col10 like 2 ");"select Col1, Col2 ");"Aucun"))\IFERROR(map(unique(query(query({'Complément'!$A$2:$J$992};"select Col4, Col5, Col6 where Col1 like '"&a&"' and Col10 like 2 ");"select Col1 "));unique(query(query({'Complément'!$A$2:$J$992};"select Col4, Col5, Col6 where Col1 like '"&a&"' and Col10 like 2 ");"select Col2 "));lambda(m;n;(transpose(query({'Complément'!$A$2:$J$992};"select Col6 where Col1 like '"&a&"' and Col4 = '"&m&"' and Col5 = '"&n&"' and Col10 like 2 "))))))}))