If I've understood the question correctly, you have a list of countries and codes in your first sheet like this:-
And you want to do a lookup on a list of countries with additional information in your second sheet like this:-
You could try using a formula like the one shown. It does a 'FIND' with each of the countries in sheet1!b2:b5 in turn to see if any match with sheet2!a2. Then the MATCH statement picks out any which do from the resulting array, and the INDEX statement finds the corresponding country code in sheet1!a2:a5.
=IFERROR(INDEX(Sheet1!A$2:A$5,MATCH(TRUE,ISNUMBER(FIND(Sheet1!B$2:B$5,A2)),0)),"")
Must be entered as an array formula with Ctrl-Shift-Enter and pulled down as required.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…