Module 16 · Job Tests · The price list task

Jamal Carter applies for a job at Meridian Supplies

Jamal passed the screening. The second round is a price list task. Customers order by code, and the workbook must show the product and the price of each order. Some phone orders have old or wrong codes. Jamal sets his egg timer to 8 minutes.

Loading the spreadsheet…

Module 16 · Job Tests

The price list task

Jamal Carter, applies for a job at Meridian Supplies
Jamal Carter applies for a job at Meridian Supplies

Jamal passed the screening. The second round is a price list task. Customers order by code, and the workbook must show the product and the price of each order. Some phone orders have old or wrong codes. Jamal sets his egg timer to 8 minutes.

Steps

  1. One XLOOKUP for the whole column

    Write XLOOKUP once and copy it down. Lock the price list with $ signs, so that the copy does not move it.

    How to do it

    1. Select the first cell of the column.
    2. Type =XLOOKUP( and the cell with the code.
    3. Type the codes of the price list with $ signs and a comma.
    4. Type the column to return with $ signs and a closing bracket.
    5. Press Enter.
    6. Select the formula and the cells below it.
    7. Press Ctrl+D.
    8. Without $, the copy in row 6 searches H6:H12, the copy in row 7 searches H7:H13, and so on. Codes at the top of the list are then missing.

    =XLOOKUP(B5,$H$5:$H$11,$I$5:$I$11)

    Task: Fill the unit prices in E5:E12. The prices are in column J of the price list.

  2. Codes that are not in the list

    XLOOKUP shows #N/A when a code is not in the list. IFERROR shows your own text instead. IF then decides what to do.

    How to do it

    1. Select the first cell of the column.
    2. Type =IFERROR(
    3. Type the XLOOKUP and a comma.
    4. Type the text for an error in quotation marks and a closing bracket.
    5. Press Enter.
    6. Select the formula and the cells below it.
    7. Press Ctrl+D.
    8. XLOOKUP has its own value for this: =XLOOKUP(B16,$H$5:$H$11,$I$5:$I$11,"Check code"). Both ways give the same result.

    =IFERROR(XLOOKUP(B16,$H$5:$H$11,$I$5:$I$11),"Check code")

    Task: Fill the Action column in E16:E19. When the product shows Check code, write Call customer. Otherwise write Ship. Use IF.