Excel practice · Lookups

HLOOKUP practice exercises

4 graded problems with realistic data, all medium.

VLOOKUP's sideways sibling: looks for a match across the top row of a table, then reads down. The 4 exercises below come from LearnExcel's practice library. Each one gives you a realistic table, a cell to fill, and a hint if you get stuck. Read them here, then solve them in the interactive grid, where your formula is checked the moment you press Enter.

New to the function? Read the HLOOKUP guide first: syntax, a worked example and the mistakes people make.

In this set

  1. Look up a value laid out across columns
  2. Look up a value using a cell reference
  3. Pull a deeper row out of a sideways table
  4. See what HLOOKUP returns when nothing matches

The exercises

1. Look up a value laid out across columns Medium

This table has quarters running across the top and revenue in the row below. Look up the revenue for "Q3".

ABCDE
1Q1Q2Q3Q4
242000480005500051000
3?

Enter a formula in A3.

Show a hint

HLOOKUP(lookup_value, table, row_index) works like VLOOKUP turned sideways; it searches the table's TOP row and returns from the row_index-th row down: =HLOOKUP("Q3",B1:E2,2).

Most tables run down (VLOOKUP's territory), but some, especially ones with time periods across the top, run sideways instead. HLOOKUP is the exact same idea as VLOOKUP, just rotated 90 degrees.

2. Look up a value using a cell reference Medium

Look up the revenue for whichever quarter is typed into B4.

ABCDE
1Q1Q2Q3Q4
242000480005500051000
3
4Lookup quarterQ4
5?

Enter a formula in A5.

Show a hint

Same shape, but the lookup value comes from a cell instead of being typed in: =HLOOKUP(B4,B1:E2,2).

A hardcoded lookup value only ever answers one question: pointing HLOOKUP at a cell is what makes the same formula answer a new question the moment someone changes that cell.

3. Pull a deeper row out of a sideways table Medium

This table has three rows of data under the quarter headers: revenue, then cost, then profit. Look up the profit for "Q2" (the 3rd row of the table).

ABCDE
1Q1Q2Q3Q4
242000480005500051000
330000310003300032000
412000170002200019000
5?

Enter a formula in A5.

Show a hint

Count rows the same way HLOOKUP's row_index always counts: the header row is row 1 of the table, so profit (3 rows below it) is row_index 4: =HLOOKUP("Q2",B1:E4,4).

This is the same off-by-one counting VLOOKUP teaches with columns: row_index 1 would just return the header you already searched on, so the data itself always starts at row_index 2.

4. See what HLOOKUP returns when nothing matches Medium

Look up revenue for "Q5", a quarter that doesn't exist in this table, to see what HLOOKUP does when the lookup value isn't found.

ABCDE
1Q1Q2Q3Q4
242000480005500051000
3?

Enter a formula in A3.

Show a hint

HLOOKUP returns the error text #N/A whenever the lookup value isn't found anywhere in the table's top row, exactly like VLOOKUP does: =HLOOKUP("Q5",B1:E2,2).

HLOOKUP fails the exact same way VLOOKUP does, which means IFERROR and ISERROR, already learned for VLOOKUP, work on HLOOKUP with zero changes.

Solve these in a real grid

Type your formula, get graded instantly. Your first 10 exercises are free, no signup.

Start the HLOOKUP exercises →

More lookups practice

All Excel practice exercises · Excel test prep