ShareYourGroupShareYourGroupExcel Formulas

Lookup functions

HLOOKUP function in Excel

HLOOKUP finds a value in the top row of a table and returns a value from the same column in a row below.

HLOOKUP is VLOOKUP turned on its side. The H stands for horizontal. Use it when the headings run across the top of the table and the data sits in rows below them, as in a sheet with one column for each month.

Syntax

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
ArgumentWhat it is
lookup_valueThe value to look for in the top row of the table.
table_arrayThe table to search. Its top row must hold the values you are looking up.
row_index_numWhich row of the table to return, counted from the top of the table. The top row is 1.
range_lookupFALSE for an exact match. TRUE, or left out, for an approximate match on a top row sorted from left to right.

Examples

Each result below is what Excel itself showed for the formula on the sample sheet.

Sample sheet: Sales and targets laid out across the sheet, with the months along the top.
ABCDEFG
1MonthJanFebMarAprMayJun
2Sales470027005250230037504100
3Target400030005000300035004000

How it works

HLOOKUP searches along the top row of the table for the lookup value. When it finds it, it moves down that column to the row number you gave and returns the value there. Row 1 is the top row of the table you selected, whatever its row number on the sheet.

Everything said about VLOOKUP's last argument applies here too. Type FALSE unless you really want an approximate match, in which case the top row must be sorted from smallest to largest, left to right.

When do tables run sideways?

Most data is stored downwards, one record per row, and for that VLOOKUP is the tool. Sideways tables appear in reports and summaries:

If you are designing a sheet yourself, store the data downwards. It is easier to sort, filter and add to. Keep the sideways layout for the final report.

Limits

XLOOKUP removes all three limits and works in both directions, so in a recent version of Excel you may never need HLOOKUP. It is still worth knowing, because many existing workbooks use it.

Picking the row by its label

A neat upgrade is to let MATCH find the row number, so the formula does not depend on a typed figure: =HLOOKUP("Mar",A1:G3,MATCH("Target",A1:A3,0),FALSE). Now the formula still works if a row is added.

In Google Sheets

HLOOKUP is the same in Google Sheets.

Related functions

Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.

This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.