=VLOOKUP(D2,A:B,2,0)
=INDEX(B:B,MATCH(D2,A:A,))
=FILTER(B:B,A:A=D2)
=IFERROR(INDEX(B:B,SMALL(IF($A$2:$A$8=$D$2,ROW($A$2:$A$8)),ROW(A1))),"")
=TEXTJOIN(",",,IF(A2:A8=D2,B2:B8,""))
=TEXTJOIN(",",,REGEXEXTRACT(CONCAT(A2:B8),"(?<="&D2&")\d+",1))
=VLOOKUP(D2,A:B,2,0)
=INDEX(B:B,MATCH(D2,A:A,))
=FILTER(B:B,A:A=D2)
=IFERROR(INDEX(B:B,SMALL(IF($A$2:$A$8=$D$2,ROW($A$2:$A$8)),ROW(A1))),"")
=TEXTJOIN(",",,IF(A2:A8=D2,B2:B8,""))
=TEXTJOIN(",",,REGEXEXTRACT(CONCAT(A2:B8),"(?<="&D2&")\d+",1))