This I think is similar to Ford's solution. Enter in A8, and for the other amend the ranges as required. You could fill this across then delete the formulae that are between the ranges that are not needed.
Formula:
=IFERROR(IFERROR(IFERROR(INDEX(A1:A4,MATCH("B",B1:B4,0)),INDEX(A1:A4,MATCH("E",B1:B4,0))),INDEX(A1:A4,MATCH("F",B1:B4,0))),"Value not found")
Bookmarks