VLOOKUP()
is the way to go:
In A1
(or wherever you begin), =VLOOKUP(B1,$C$1:$D$3,2,FALSE)
Explained:
B1
is the value you're looking for;
$C$1:$D$3
is the range in which you will be looking and returning from, note that VLOOKUP will always search in the first column (so C column); Adjust according to your actual range;
Now I've used absolute references, so you can just drag down from here on.
2 is the column number which you wish to return (so D column);
Wrap the thing in ISERROR(formula here, "error message here")
to add an error message if not found:
(Column A contains the formula, column B was manual input)
XLOOKUP()
would make this easier, but I don't think that works in Excel-2010.
Edit: added FALSE
argument to the formula to find only exact matches, thanks Darren Bartrup-Cook