I have found this but it works for value in A1:A7
=INDEX($A$1:$B$7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2)

I need to be able to search from A1 to A300 but I have errors if i try to change the formula