Module 7 · Lookup · Lookup to the left

Kofi Mensah works at the counter of Kestrel Auto Parts

Customers call and say the name of the part. Kofi needs the part number. In the list, the number is to the left of the name. VLOOKUP cannot look to the left. INDEX and MATCH can.

Loading the spreadsheet…

Module 7 · Lookup

Lookup to the left

Kofi Mensah, works at the counter of Kestrel Auto Parts
Kofi Mensah works at the counter of Kestrel Auto Parts

Customers call and say the name of the part. Kofi needs the part number. In the list, the number is to the left of the name. VLOOKUP cannot look to the left. INDEX and MATCH can.

Steps

  1. Find the position with MATCH

    MATCH finds a value in a range and gives back its position. 0 means an exact match.

    How to do it

    1. Select the cell for the result.
    2. Type =MATCH( and the value to find. Type a comma.
    3. Type the locked range to search and a comma.
    4. Type 0 for an exact match and a closing bracket.
    5. Press Enter.

    =MATCH(C5,$I$5:$I$12,0)

    Task: Find the position for the other callers. Fill in D6:D10.

  2. Look to the left with INDEX and MATCH

    INDEX gives back the value at a position in a range. With MATCH inside, INDEX can look in any column, also to the left.

    How to do it

    1. Click cell E5.
    2. Type =INDEX( and the locked range with the answer. Type a comma.
    3. Type the MATCH as value 2. Close both brackets.
    4. Press Enter.
    5. The position is already in column D, so =INDEX($H$5:$H$12,D5) works too.

    =INDEX($H$5:$H$12,MATCH(C5,$I$5:$I$12,0))

    Task: Find the part numbers for the other callers. Fill in E6:E10.