
π This article includes 2 downloadable practice files β
In this article
HLOOKUP is VLOOKUP turned sideways: it searches the top row and returns a value from a row below.
Syntax
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
| Argument | What it means |
|---|---|
lookup_value |
Value to find in the first row. |
row_index_num |
Which row to return. |
range_lookup |
FALSE for exact. |
Examples
Example 1
=HLOOKUP("Mar", $B$1:$M$20, 5, FALSE)
March value for the 5th row of a months-across table.
HLOOKUP in practice
Where you will use it
- Look up a rate from a horizontal slab table
- Monthly targets laid out across columns
- Old templates with headings in rows
Worked example
| Month | Formula | Result |
|---|---|---|
| Apr | =HLOOKUP(A2,$E$1:$G$2,2,FALSE) | 100 |
| Jun | =HLOOKUP(A3,$E$1:$G$2,2,FALSE) | 150 |
| May | =HLOOKUP(A4,$E$1:$G$2,2,FALSE) | 120 |
Results calculated in Excel. Target table: Apr 100, May 120, Jun 150 in E1:G2.
Mistakes people make
| Mistake | What to do instead |
|---|---|
| Forgetting FALSE | Approximate match returns wrong values on unsorted headers |
| Row number changes | XLOOKUP is safer when rows are inserted |
Related functions
VLOOKUP Β· XLOOKUP Β· INDEX
π Part of the free Excel course: Beginner β Expert Β· Try it in the Formula Lab or ask the AI Helper.
Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.
π Practice files for this article
β¬ Download all 2 files (ZIP Β· 39 KB)
- πLookup scenarios workbookVLOOKUP, HLOOKUP, INDEX/MATCH and XLOOKUP side by side β vertical, horizontal, two-way β plus 6 real failure cases and their fixes, with PASS/FAIL checks.β¬ XLSX Β· 10 KB
- πPractice workbook: Lookup & reference17 tasks on realistic sales data β type your formula, the Check column turns green when it is right. Answers sheet included.β¬ XLSX Β· 35 KB
Free to use for learning. Files with macros (.bas) are plain text β import them with Alt+F11 β File β Import File, and always test on a copy.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time β plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul βBuild this skill next
This page is a quick function reference. Use it for syntax, then practise the function in a broader workflow.
Stuck on a step? Ask a question and the AI answers using this article.