Sorry,
Forgot to insert your sheet names where appropriate per your original post.
Note: The reference to Column A are just used for counters/locators. They are not referencing specific information from your sheet(s).
=IF(ROWS($A$1:A1)>COUNTIF(Sheet1!$B$1:$B$1000,$E$2),"",INDEX(Sheet1!$D$1:$D$1000,SMALL(IF(Sheet1!$B$1:$B$1000=$E$2,ROW(Sheet1!$A$1:$A$1000)-ROW(Sheet1!$A$1)+1),ROWS($A$1:A1))))
don't forget to update ranges to encompass your whole lookup table range and then confirm with CTRL+SHIFT+ENTER