Today I spent some time looking for this trick. The function to use is called VLOOKUP. From Office Support web page:
Use VLOOKUP, one of the lookup and reference functions, when you need to find things in a table or a range by row. For example, look up a price of an automotive part by the part number.
Function VLOOKUP requires 4 arguments. the first two are easy to understand, but the third