The first thing most people do when they type =HLOOKUP( is press Enter after selecting a lookup value and table range — then stare at #N/A. They assume their data is broken. It’s not. It’s the function — and how they’re using it.
The Setup
You manage regional sales for Alibaba Cloud partners across APAC. Every month, your team submits performance reports in this exact layout — row-based headers, not columns. That’s the whole point of HLOOKUP: horizontal lookup. Here’s your raw data in A1:G6:
| Metric | Tokyo | Seoul | Singapore | Sydney | Bangkok | Kuala Lumpur |
|---|---|---|---|---|---|---|
| Q1 Revenue (USD) | $142,800 | $97,200 | $115,400 | $89,600 | $72,100 | $63,900 |
| Q1 New Accounts | 24 | 19 | 22 | 17 | 15 | 13 |
| Avg. Deal Size | $5,950 | $5,115 | $5,245 | $5,270 | $4,806 | $4,915 |
| Support Tickets Opened | 41 | 33 | 37 | 29 | 31 | 26 |
| Renewal Rate % | 92.4% | 89.1% | 91.7% | 87.3% | 85.9% | 88.2% |
The Challenge
Your finance lead emails: “Pull Q1 Revenue for Tokyo and Sydney only — drop into cells D10 and D11.”
You know HLOOKUP is built for this: find “Q1 Revenue (USD)” in row 1, go down to row 2, return the value under “Tokyo” or “Sydney”. But if you write =HLOOKUP("Tokyo",A1:G6,2,FALSE), Excel returns #N/A. Why? Because HLOOKUP searches the first row of the table — not the first column. You just asked it to find “Tokyo” in row 1… where it lives. But then you told it to return row 2. That gives you $142,800 — which is correct. Wait — so why the error?
Because you typed "Tokyo" as the lookup_value, but HLOOKUP expects the lookup value to be in the first row. So it scans A1:G1, finds “Tokyo” in B1, then pulls from row 2 → B2 = $142,800. That part works. The real trap? If you later add a column between A and B — say, “Hong Kong” — and forget to update the table range, HLOOKUP breaks. Worse: if you copy that formula down without locking the table array, it shifts. And yes — FALSE is mandatory here. TRUE forces approximate match, which requires the top row sorted ascending. Don’t do that.
Walking Through It
Do this — no shortcuts yet.
Step 1: In D10, type: =HLOOKUP("Tokyo",A1:G6,2,FALSE). Press Enter. Result: $142,800.
Step 2: Now click D10, press Ctrl+C, then click D11 and press Ctrl+V. Excel pastes =HLOOKUP("Tokyo",A2:G7,2,FALSE). See it? The range shifted down one row — because you didn’t lock it. That’s why #N/A appears.
Fix it: Edit D10. Change A1:G6 to $A$1:$G$6. Now copy again. D11 gets =HLOOKUP("Sydney", $A$1:$G$6, 2, FALSE). But wait — you need “Sydney”, not “Tokyo”. So manually change the first argument in D11.
Here’s the before/after for D10:
| Formula | Result | Issue |
|---|---|---|
=HLOOKUP("Tokyo",A1:G6,2,FALSE) | $142,800 | Unlocked range — breaks on copy |
=HLOOKUP("Tokyo", $A$1:$G$6, 2, FALSE) | $142,800 | Stable. Safe to copy. |
The Result
After correction, D10 and D11 hold clean values — no errors, no manual rework. Final output in D10:D11:
| City | Q1 Revenue |
|---|---|
| Tokyo | $142,800 |
| Sydney | $89,600 |
What Could Go Wrong
Mistake #1: Forgetting the row index is relative to the table array — not the worksheet.
You set HLOOKUP(..., A1:G6, 2, FALSE). That “2” means “second row of A1:G6” → row 2. If you shift the table to start at A3:G8, “2” now points to row 4 of the sheet — not row 2. Always double-check what row number corresponds to your target data inside the selected range.
Mistake #2: Using text lookup values without trimming whitespace.
If “Tokyo ” (with trailing space) sits in your header row, HLOOKUP("Tokyo",...) fails. Use =TRIM() on the lookup_value or clean source data first. No warning — just #N/A.
Mistake #3: Assuming HLOOKUP auto-updates when rows are inserted above the table.
Insert a new row at row 1 (above your headers), and A1:G6 becomes A2:G7 — but your formula still reads A1:G6. It now skips the real header row. Fix: Use a named range like RegionalData mapped to $A$1:$G$6. Then use =HLOOKUP("Tokyo", RegionalData, 2, FALSE). Named ranges adjust automatically.
Bonus counterintuitive tip: HLOOKUP can pull from below the header row — even if that row contains formulas or errors. As long as the row index points to a valid row in the table array, it returns whatever’s there. It doesn’t validate content — just location.
Here’s how HLOOKUP compares to alternatives for your 10K-row scenario:
| Method | Time for 10K rows | Accuracy | Difficulty |
|---|---|---|---|
| HLOOKUP (with $ locks) | 0.8 sec | High | Low |
| INDEX + MATCH (horizontal) | 0.6 sec | Very High | Medium |
| XLOOKUP (2021+) | 0.5 sec | Very High | Low |
| VLOOKUP + TRANSPOSE | 2.3 sec | Low | High |
If you’re stuck with legacy Excel, use HLOOKUP — but lock those ranges. If you have Microsoft 365, switch to XLOOKUP now. Press Alt+M, L to open Name Manager and define RegionalData — do it once, save hours later.