0
0
Google Sheetsspreadsheet~20 mins

XLOOKUP function in Google Sheets - Practice Problems & Coding Challenges

Choose your learning style9 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
Find the price of a product using XLOOKUP
You have a list of products in column A and their prices in column B. What is the result of this formula if you look up "Banana"?

=XLOOKUP("Banana", A2:A5, B2:B5, "Not found")

Given:
A2:A5 = {"Apple", "Banana", "Cherry", "Date"}
B2:B5 = {1.2, 0.5, 2.5, 3.0}
A0.5
B"Not found"
C1.2
D2.5
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
Choose the correct XLOOKUP formula to find a student's score
You have student names in C2:C6 and their scores in D2:D6. Which formula correctly finds the score for "John"?
A=XLOOKUP("John", D2:D6, C2:C6)
B=XLOOKUP("John", C2:C6, D2:D6)
C=XLOOKUP(C2:C6, "John", D2:D6)
D=XLOOKUP(D2:D6, "John", C2:C6)
Attempts:
2 left
💡 Hint
Remember the order: lookup value, lookup array, return array.
🎯 Scenario
advanced
2:00remaining
Handle missing lookup values with XLOOKUP
You want to find the price of "Orange" in a list of fruits and prices. If "Orange" is not found, you want to show "Price not available". Which formula does this correctly?
A=XLOOKUP(A2:A5, "Orange", B2:B5, "Price not available")
B=XLOOKUP("Orange", A2:A5, B2:B5)
C=XLOOKUP("Orange", B2:B5, A2:A5, "Price not available")
D=XLOOKUP("Orange", A2:A5, B2:B5, "Price not available")
Attempts:
2 left
💡 Hint
Use the 4th argument to specify the value if not found.
📊 Formula Result
advanced
2:00remaining
Find the last matching value using XLOOKUP
Given a list of dates in E2:E7 and sales in F2:F7, what does this formula return?

=XLOOKUP(DATE(2023,5,10), E2:E7, F2:F7, "No sale", 0, -1)

Data:
E2:E7 = {2023-05-01, 2023-05-10, 2023-05-10, 2023-05-15, 2023-05-20, 2023-05-10}
F2:F7 = {100, 200, 150, 300, 400, 250}
A250
B200
C150
D"No sale"
Attempts:
2 left
💡 Hint
The 6th argument -1 tells XLOOKUP to find the last match.
data_analysis
expert
3:00remaining
Analyze XLOOKUP with approximate match and sorted data
You have sorted scores in G2:G6 and grades in H2:H6:
G2:G6 = {50, 60, 70, 80, 90}
H2:H6 = {"F", "D", "C", "B", "A"}

What grade does this formula return for a score of 75?

=XLOOKUP(75, G2:G6, H2:H6, "No grade", 1)
A"D"
B"B"
C"C"
D"No grade"
Attempts:
2 left
💡 Hint
With match_mode 1, XLOOKUP finds the next smaller item if exact match is missing.