How to look up a value in a list and return multiple corresponding values


Identify the row numbers that contain the name $A$10 in column A (Use Row(1:1) because Data starts in row1)

=SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1))

Return the corresponding values from column B,

=INDEX($A$1:$B$7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2)

and remove possible error values.

=IF(ISERROR(INDEX($A$1:$B$7,SMALL( IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2)),"",INDEX($A$1:$B$7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2))

Use (CTRL+SHIFT+ENTER) to input formula