Look up data by using the XLOOKUP() function
=XLOOKUP(I2, $A$2:$A$6, $D$2:$D$6, "Not listed")Find I2 in the codes, return the price from the same row, and show Not listed when the code is missing. Lock both ranges before you fill it down, because the exam checks every cell in the range, not just the first.
What the MO-211 task asks
MO-211 is performance-based: you build the answer in a live workbook. In our MO-211 practice exams a lookup task describes the result it wants and leaves the function to you — return each order's price from the price list, say — so the first job is recognising a lookup when the instruction never says the word.
The wording tells you which XLOOKUP arguments you need. “Must match exactly” is XLOOKUP's default. A cell that “must read” a given text when an item is missing, “handled inside the lookup itself”, means the fourth argument, if_not_found, not a second function wrapped round the lookup. “The nearest band at or below” means match_mode -1. “Lock the ranges so the formula fills down” means the lookup and return ranges need dollar signs.
Our grader then checks the value in every cell of the target range, and sometimes that the ranges are absolute. One wrong cell fails the whole range, so a formula that is right in the first row and wrong in the fourth scores the same as no formula at all.
Worked examples
Type these into a blank sheet to follow along. Every result below is what Excel showed.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Code | Product | Category | Price |
| 2 | P-101 | Desk lamp | Lighting | 24 |
| 3 | P-102 | Office chair | Furniture | 149 |
| 4 | P-103 | Monitor arm | Accessories | 39 |
| 5 | P-104 | Standing desk | Furniture | 329 |
| 6 | P-105 | Cable tray | Accessories | 18 |
| F | G | |
|---|---|---|
| 1 | Min qty | Discount |
| 2 | 0 | 0% |
| 3 | 10 | 5% |
| 4 | 50 | 10% |
| 5 | 100 | 15% |
| I | J | |
|---|---|---|
| 1 | Order code | Price |
| 2 | P-102 | 149 |
| 3 | P-105 | 18 |
| 4 | P-109 | Not listed |
| 5 | P-101 | 24 |
=XLOOKUP("P-104", A2:A6, D2:D6)Find P-104 in the codes and return the price from the same row. No match argument is needed: XLOOKUP matches exactly unless you tell it otherwise.
=XLOOKUP("Monitor arm", B2:B6, A2:A6)The return range sits to the left of the one searched. XLOOKUP does not care which side it is on, because the two ranges are separate arguments.
=XLOOKUP("P-109", A2:A6, D2:D6, "Not listed")There is no P-109. The fourth argument is what XLOOKUP returns when nothing matches; leave it out and the same formula returns #N/A.
=XLOOKUP(64, F2:F5, G2:G5, , -1)64 is not a threshold, so an exact match returns #N/A. Match mode -1 takes the next smaller item instead: 50, so 10%. A quantity of 9 returns 0% and 100 returns 15%.
=XLOOKUP(I2, $A$2:$A$6, $D$2:$D$6, "Not listed")This is the shape of most lookup tasks: one formula in the first cell, filled down. The dollar signs keep both ranges fixed while I2 moves to I3, I4 and I5. This is what the video below builds.
Watch it done in Excel
The last example above, recorded in real Excel on the same grid.
Exam traps
Unlocked, =XLOOKUP(I2, A2:A6, D2:D6, "Not listed") filled to J5 becomes =XLOOKUP(I5, A5:A9, D5:D9, "Not listed"). The ranges have slid past P-101, so J5 reads Not listed instead of 24. The first two rows still look right, which is why this one gets past people.
On a band table the default exact match returns #N/A for any value that is not a threshold. Match mode -1 is “at or below”; 1 is “at or above”, and on the discount bands =XLOOKUP(64, F2:F5, G2:G5, , 1) returns 15%, a real-looking wrong answer.
When a task says the not-found result must be handled inside the lookup itself, wrapping the lookup in a separate error-trapping function is not what it asked for. Use XLOOKUP's fourth argument, and type the text exactly as the task gives it.
=XLOOKUP("P-104", A2:A6, D2:D5) returns #VALUE!, because the return range is one row shorter than the range searched. It usually happens when one range is typed and the other selected with the mouse.
If a column holds numbers stored as text, =XLOOKUP(101, …) returns #N/A even though 101 is plainly there, while =XLOOKUP("101", …) finds it. The value you look up and the column you search have to be the same type.
FAQ
Is XLOOKUP case-sensitive?
No. =XLOOKUP("p-104", A2:A6, D2:D6) returns 329, the same as "P-104".
What happens when two rows match?
XLOOKUP returns the first one, searching from the top. =XLOOKUP("Furniture", C2:C6, B2:B6) returns Office chair. Set the sixth argument, search_mode, to -1 to search from the bottom: the same lookup then returns Standing desk.
Can XLOOKUP return more than one column?
Yes. =XLOOKUP("P-104", A2:A6, B2:D6) returns Standing desk, Furniture and 329 into three cells side by side. The result spills, so the cells to its right must be empty or it shows #SPILL!.
Does XLOOKUP need the data sorted?
No, not for an exact match or for match mode -1 or 1. Excel finds the nearest smaller or larger item whatever the order. Only the binary search modes of the sixth argument need sorted data.
Do I still need VLOOKUP for MO-211?
Yes. The outline names XLOOKUP, VLOOKUP, HLOOKUP, MATCH and INDEX in the same bullet, so expect any of them. A task that describes only the result can usually be done with XLOOKUP, but learn the other four too.
New to this function?
This page covers what the exam asks. For the full how-to — every argument, more examples and a practice workbook — read our guide on dfwexcel.com.
The XLOOKUP function, explained — dfwexcel.comTry it under exam conditions
Take a full, timed MO-211 practice exam, upload the workbook you built, and get a score out of 1000 with a per-task breakdown of where the points went. Your first one is free.
No credit card needed.
