Cellwise Try it free

Unit 7 of 12 Lesson 1 free ยท Plus

Lookups

Find answers in another table.

Functions in this unit: VLOOKUP, XLOOKUP, MATCH, INDEX

Key ideas

VLOOKUP needs FALSE

=VLOOKUP(F2,A2:D7,3,FALSE)

Find F2 in the first column, return column 3. FALSE means exact match only.

XLOOKUP is simpler

=XLOOKUP(F2,A2:A7,C2:C7)

Where to look, what to return. It can look left and has a built-in not-found message.

INDEX + MATCH

=INDEX(C2:C7,MATCH(F2,A2:A7,0))

MATCH finds the position, INDEX returns what is at that position.

Lesson 1: VLOOKUP

  1. What does FALSE mean as the last VLOOKUP argument?

    • Exact match only
    • Return FALSE if missing
    • Search from the bottom
    • Ignore case
    Show answer

    Exact match only. Without FALSE, VLOOKUP guesses the closest match, which causes silent wrong answers.

  2. Look up the price of the ID in F2. Put it in G2.

    ABCDEFG
    1IDItemPriceStockFind IDPrice
    2P-101Desk lamp34.9912P-104
    3P-102Monitor arm894
    4P-103USB hub24.530
    5P-104Webcam59.950
    6P-105Keyboard7418
    7P-106Mouse pad12.7552

    Hint: =VLOOKUP(F2,A2:D7,3,FALSE). Price is the 3rd column of the table.

    Show answer

    =VLOOKUP(F2,A2:D7,3,FALSE) in G2. Change F2 and the price updates. That is a live lookup.

  3. Build: find the Item name for the ID in F2

    Show answer

    =VLOOKUP(F2,A2:D7,2,FALSE). Item is the 2nd column of A2:D7.

  4. What will G2 show? The ID does not exist.

    ABCDEFG
    1IDItemPriceStock
    2P-101Desk lamp34.9912P-999
    3P-102Monitor arm894
    4P-103USB hub24.530
    5P-104Webcam59.950
    6P-105Keyboard7418
    7P-106Mouse pad12.7552

    G2 contains =VLOOKUP(F2,A2:D7,3,FALSE)

    Show answer

    #N/A. #N/A means "not available": the value was not found.

  5. How many are in stock for the ID in F2? Put it in G2.

    ABCDEFG
    1IDItemPriceStockFind IDStock
    2P-101Desk lamp34.9912P-105
    3P-102Monitor arm894
    4P-103USB hub24.530
    5P-104Webcam59.950
    6P-105Keyboard7418
    7P-106Mouse pad12.7552

    Hint: Stock is column 4.

    Show answer

    =VLOOKUP(F2,A2:D7,4,FALSE) in G2. Same formula, different column number.

Lesson 2: XLOOKUP

Lesson 2 is part of Cellwise Plus. Lesson 1 above is free to read here and to practice in the app.

See what Plus includes

Lesson 3: INDEX and MATCH

Lesson 3 is part of Cellwise Plus. Lesson 1 above is free to read here and to practice in the app.

See what Plus includes

Guides on this topic