microsoft excel – Filter values from a combination of more than one column

Admittedly, I am quite an amateur when using excel aggregate function.

From attached image, please, how will I be able to filter names from both column B and E such that every entry with destination will be recorded accordingly on columns K:O as shown

I have tried using the following formula which only returns values from Manual entry table (columns E:F) but it doesn’t take values on column B from the Automatic table (columns A:C). For instance when I recorded “BEN” as having gone to LAGOS on column B, it returned “0” on column O instead of “BEN”

=IFERROR(INDEX($E:$E,AGGREGATE(15,7,ROW($B$3:$B$50:$E$3:$E$20)/(ISNUMBER(MATCH($C$3:$C$50:$F$3:$F$20,{“LAGOS”},0))),ROW($ZZ1))),””)

File Screenshot