Bird
Raised Fist0
Excelspreadsheet~20 mins

XLOOKUP function in Excel - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
XLOOKUP Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
What is the result of this XLOOKUP formula?
Given the table:

Product | Price
Apple | 1.2
Banana | 0.5
Cherry | 2.0

What is the output of the formula =XLOOKUP("Banana", A2:A4, B2:B4)?
ABanana
B0.5
C#N/A
D1.2
Attempts:
2 left
💡 Hint
XLOOKUP finds the matching value in the lookup array and returns the corresponding value from the return array.
❓ Function Choice
intermediate
2:00remaining
Which XLOOKUP formula returns "Not found" if the item is missing?
You want to find the price of "Orange" in the list below. If "Orange" is not found, the formula should return "Not found".

Product | Price
Apple | 1.2
Banana | 0.5
Cherry | 2.0

Which formula does this correctly?
A=XLOOKUP("Orange", A2:A4, B2:B4, "Not found")
B=XLOOKUP("Orange", A2:A4, B2:B4)
C=XLOOKUP("Orange", A2:A4, B2:B4, 0)
D=XLOOKUP("Orange", A2:A4, B2:B4, NA())
Attempts:
2 left
💡 Hint
The fourth argument in XLOOKUP is the value to return if no match is found.
📊 Formula Result
advanced
2:00remaining
What is the output of this XLOOKUP with approximate match?
Given the table:

Score | Grade
0 | F
60 | D
70 | C
80 | B
90 | A

What is the result of =XLOOKUP(75, A2:A6, B2:B6, "No grade", 1)?
AB
BNo grade
CC
DD
Attempts:
2 left
💡 Hint
The 5th argument '1' means approximate match, looking for the next smaller value.
🎯 Scenario
advanced
2:00remaining
You want to find the last matching value using XLOOKUP. Which formula works?
You have a list of dates and sales amounts. You want to find the sales amount for the last date that matches "2024-01-15".

Which XLOOKUP formula returns the last matching sales amount?
A=XLOOKUP("2024-01-15", A2:A10, B2:B10, "Not found", 1, 1)
B=XLOOKUP("2024-01-15", A2:A10, B2:B10, "Not found", -1, 1)
C=XLOOKUP("2024-01-15", A2:A10, B2:B10, "Not found", 0, 1)
D=XLOOKUP("2024-01-15", A2:A10, B2:B10, "Not found", 0, -1)
Attempts:
2 left
💡 Hint
The 6th argument controls search direction: -1 searches from last to first.
❓ data_analysis
expert
2:00remaining
How many items does this XLOOKUP formula return?
Given the table:

Item | Category
Pen | Office
Book | Office
Apple| Food
Milk | Food

What is the number of items returned by this formula?

=XLOOKUP({"Office","Food"}, B2:B5, A2:A5)
A2
B4
C1
D#VALUE! error
Attempts:
2 left
💡 Hint
XLOOKUP with an array lookup value returns an array of results, one for each lookup value.

Practice

(1/5)
1. What does the XLOOKUP function do in Excel?
easy
A. It creates a chart from data.
B. It adds up all numbers in a column.
C. It finds a value in a range and returns a corresponding value from another range.
D. It sorts data alphabetically.

Solution

  1. Step 1: Understand the purpose of XLOOKUP

    XLOOKUP searches for a value in one range and returns a matching value from another range.
  2. Step 2: Compare with other options

    The other options describe creating charts, adding up numbers, or sorting data, which are different Excel functions unrelated to XLOOKUP.
  3. Final Answer:

    It finds a value in a range and returns a corresponding value from another range. -> Option C
  4. Quick Check:

    XLOOKUP finds and returns matching values [OK]
Hint: XLOOKUP matches a value and returns related data [OK]
Common Mistakes:
  • Confusing XLOOKUP with SUM or SORT functions
  • Thinking XLOOKUP creates charts
  • Assuming XLOOKUP only works with numbers
2. Which of these is the correct syntax for the XLOOKUP function?
easy
A. XLOOKUP(return_array, lookup_value, lookup_array)
B. XLOOKUP(lookup_value, return_array, lookup_array)
C. XLOOKUP(lookup_array, lookup_value, return_array)
D. XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

Solution

  1. Step 1: Recall XLOOKUP syntax

    The correct order is lookup_value, lookup_array, return_array, then optional arguments.
  2. Step 2: Check each option

    Only XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]) follows this correct order and includes optional parameters correctly.
  3. Final Answer:

    XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]) -> Option D
  4. Quick Check:

    Correct syntax order = XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]) [OK]
Hint: Remember: lookup_value, lookup_array, return_array order [OK]
Common Mistakes:
  • Swapping lookup_array and return_array
  • Omitting required arguments
  • Using wrong argument order
3. Given the table below, what will =XLOOKUP(102, A2:A5, B2:B5, "Not found") return?

IDName
101Alice
102Bob
103Charlie
104Diana
medium
A. Alice
B. Bob
C. Not found
D. Charlie

Solution

  1. Step 1: Identify lookup_value and lookup_array

    Lookup value is 102, lookup array is A2:A5 containing IDs 101, 102, 103, 104.
  2. Step 2: Find matching value and return corresponding name

    102 matches second row, so return value from B2:B5 second row is 'Bob'.
  3. Final Answer:

    Bob -> Option B
  4. Quick Check:

    Lookup 102 returns Bob [OK]
Hint: Match lookup value in first column, return from second [OK]
Common Mistakes:
  • Returning wrong row's value
  • Confusing lookup and return arrays
  • Expecting 'Not found' when value exists
4. What is wrong with this formula? =XLOOKUP(105, A2:A5, B2:B5) given the same table as above.
medium
A. It will return an error because 105 is not found and no if_not_found argument is given.
B. The lookup_array and return_array are reversed.
C. The formula syntax is missing parentheses.
D. It will return the last value in B2:B5 by default.

Solution

  1. Step 1: Check if lookup_value exists in lookup_array

    105 is not in A2:A5 (101-104), so no match found.
  2. Step 2: Understand default behavior without if_not_found

    Without the optional if_not_found argument, XLOOKUP returns #N/A error if no match.
  3. Final Answer:

    It will return an error because 105 is not found and no if_not_found argument is given. -> Option A
  4. Quick Check:

    No match without if_not_found causes error [OK]
Hint: Add if_not_found to avoid errors when no match [OK]
Common Mistakes:
  • Assuming it returns last value by default
  • Thinking syntax is incorrect
  • Swapping lookup and return arrays
5. You want to find the price of a product by its code in column A and return the price from column C. If the product code is not found, you want to show "Price not available". Which formula correctly does this using XLOOKUP?
hard
A. =XLOOKUP(E2, A2:A10, C2:C10, "Price not available")
B. =XLOOKUP(A2:A10, E2, C2:C10, "Price not available")
C. =XLOOKUP(E2, C2:C10, A2:A10, "Price not available")
D. =XLOOKUP(E2, A2:A10, C2:C10)

Solution

  1. Step 1: Identify lookup_value and arrays

    Lookup value is in E2 (product code), lookup array is A2:A10 (product codes), return array is C2:C10 (prices).
  2. Step 2: Check for if_not_found argument

    =XLOOKUP(E2, A2:A10, C2:C10, "Price not available") includes "Price not available" for missing codes, fulfilling the requirement.
  3. Final Answer:

    =XLOOKUP(E2, A2:A10, C2:C10, "Price not available") -> Option A
  4. Quick Check:

    Correct lookup and return arrays with if_not_found [OK]
Hint: Use if_not_found to show message when no match [OK]
Common Mistakes:
  • Swapping lookup and return arrays
  • Omitting if_not_found argument
  • Using wrong cell references
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard