ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 41 · Lookups

HLOOKUP in Excel

HLOOKUP is VLOOKUP turned on its side. It searches across the top row of a table and brings back a value from a row below.

Practice this lesson →Pro lesson. The first 4 lessons are free.

What you will learn

  • Look up a value in a table that goes across
  • Choose which row to return

How it works

=HLOOKUP(B5,$B$1:$F$3,2,FALSE) finds the month in B5 in the top row, then returns the value from row 2 of the table.

Formulas at a glance

=HLOOKUP(value, table, row_num, FALSE)The pattern to follow

Example

Write the formula to look up the Sales for the month in B5.

ABCDEF
1MonthJanFebMarAprMay
2Sales120135160150180
3Visitors4052615870
4
5MonthMarMonthMay
6SalesSales
7VisitorsVisitors

Click B6 and type =HLOOKUP(B5,$B$1:$F$3,2,FALSE), then press Enter.

The answer is 160.

When to use it

  • Tables with months across the top
  • Looking up a value in a wide table
  • Price lists laid out in rows

Common mistakes

  • Using VLOOKUP on a sideways tableIf the labels run across the top, use HLOOKUP.
  • Counting the row number wrongCount from the table’s top row, starting at 1.
  • Leaving out FALSEAdd FALSE for an exact match.

Practice it on a real sheet

Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.

HLOOKUP in Excel: how it works, with examples · ExcelUnpack