I guess you can't use the names to find the matches?

If not, then maybe this is what you mean?

In C3, copied down:

=INDEX($J$3:$J$8,IF(ISNUMBER(MATCH(A3,$H$3:$H$8,0)),MATCH(A3,$H$3:$H$8,0),MATCH(A2,$H$3:$H$8,0)+1))