Maintenance Notification: We are upgrading our servers today so you may experience intermediate outages. Thank you for your patience.
Look up data by using functions
MO-211

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.

Price list
ABCD
1CodeProductCategoryPrice
2P-101Desk lampLighting24
3P-102Office chairFurniture149
4P-103Monitor armAccessories39
5P-104Standing deskFurniture329
6P-105Cable trayAccessories18
Discount bands
FG
1Min qtyDiscount
200%
3105%
45010%
510015%
Orders (the video fills J2:J5)
IJ
1Order codePrice
2P-102149
3P-10518
4P-109Not listed
5P-10124
An exact match
=XLOOKUP("P-104", A2:A6, D2:D6)
Returns 329

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.

Looking left
=XLOOKUP("Monitor arm", B2:B6, A2:A6)
Returns P-103

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.

A missing value, handled inside the lookup
=XLOOKUP("P-109", A2:A6, D2:D6, "Not listed")
Returns 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.

The nearest band at or below
=XLOOKUP(64, F2:F5, G2:G5, , -1)
Returns 10%

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%.

Filled down a column
=XLOOKUP(I2, $A$2:$A$6, $D$2:$D$6, "Not listed")
Returns 149, 18, Not listed, 24 in J2:J5

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

Filling down without locking the ranges

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.

Answering “at or below” with the default match

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.

Handling the missing case outside the lookup

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.

Return and lookup ranges of different sizes

=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.

A number looked up in a column of text

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.com

Try 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.