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 HLOOKUP() function

=HLOOKUP(B5, $B$1:$E$2, 2, FALSE)

Find B5 along the top row of B1:E2 and return the value from the 2nd row beneath it, matching exactly. Lock the table before you fill it down.

What the MO-211 task asks

HLOOKUP is VLOOKUP turned on its side, for a table whose labels run across a row. In our MO-211 practice exams its task asks you to match a label “along the table's top row” and “bring back the value from the row beneath it”. “Along the top row” is the clue that the table is horizontal; “match exactly” is FALSE in the fourth argument.

The row number counts from the table's own top row, so the value directly beneath is row 2. A banded table across a row works the same way as VLOOKUP's: TRUE takes the nearest boundary at or below, when the top row is sorted ascending.

Our grader checks the value in every cell of the target range. It reads the values, not the function, so any lookup that produces them earns the points — but one wrong cell fails the whole range.

Worked examples

Type these into a blank sheet to follow along. Every result below is what Excel showed.

Channel discounts
ABCDE
1ChannelRetailOnlineTradeExport
2Discount0%5%12%8%
Orders (the video fills C5:C8)
ABC
4OrderChannelDiscount
5O-1Online5%
6O-2Trade12%
7O-3Retail0%
8O-4Export8%
Weight bands
HIJKL
1Min kg021025
2Rate591528
An exact match across a row
=HLOOKUP("Trade", B1:E2, 2, FALSE)
Returns 12% (0.12)

Find Trade along the top row of B1:E2 and return the value in the 2nd row of the table, directly beneath it.

Only the top row is searched
=HLOOKUP("Discount", A1:E2, 1, FALSE)
Returns #N/A

Discount is a label in column A's second row, and HLOOKUP never looks there: it searches the first row of the table only.

The nearest band at or below
=HLOOKUP(7, I1:L2, 2, TRUE)
Returns 9

7 kg is not a band boundary, so an exact match returns #N/A. TRUE takes the largest Min kg not above 7 — 2 — so the rate is 9. 30 kg returns 28.

Filled down a column
=HLOOKUP(B5, $B$1:$E$2, 2, FALSE)
Returns 5%, 12%, 0%, 8% in C5:C8

The table is locked, so every order searches the same channel row. 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 table

Unlocked, =HLOOKUP(B5, B1:E2, 2, FALSE) filled down moves the table to B2:E3 in the next row — below the channel names — so every order after the first shows #N/A. A horizontal table breaks from the second row, not the fifth.

A row number past the table

The row number counts from the table's top row and cannot go past its last row. =HLOOKUP("Trade", B1:E2, 3, FALSE) returns #REF!, because B1:E2 has only two rows.

Reaching for VLOOKUP on a horizontal table

If the labels run across a row, VLOOKUP searches the wrong direction. The task's “along the table's top row” is the signal for HLOOKUP (or XLOOKUP with row ranges).

Approximate match on labels

Without FALSE, HLOOKUP matches approximately and assumes a sorted top row. The channel names are not sorted, so only an exact match is safe; a missing channel such as Mail should return #N/A, and with FALSE it does.

FAQ

What is the difference between HLOOKUP and VLOOKUP?

Direction. HLOOKUP searches across the top row and returns from a numbered row beneath; VLOOKUP searches down the first column and returns from a numbered column to the right.

Is HLOOKUP case-sensitive?

No. =HLOOKUP("online", B1:E2, 2, FALSE) returns 0.05, the Online discount.

Does the table have to start at the labels?

The top row of the table must hold what you search for. Starting at A1 also works here — =HLOOKUP("Trade", A1:E2, 2, FALSE) still returns 0.12 — because Trade is still in the top row.

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