Contact

HLOOKUP Function in Google Sheets: Formula, Examples & Troubleshooting

Lookup Intermediate Google Sheets

Learn the HLOOKUP formula in Google Sheets: search a header row and return a value beneath the match, with reproducible examples, expected answers and compatibility cautions.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: HLOOKUP searches across the first row of a range and returns a chosen row from the matched column. FALSE requests exact matching; TRUE or omission requests approximate matching on a correctly ascending-sorted search row.

Availability and version history

  • Introduced: Introduction version not established by the official history reviewed.
  • Availability: Documented in the rolling Google Sheets service; examples use the web spreadsheet workflow.
  • Checked: October 14, 2026; official HLOOKUP reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Syntax and original practice data

=HLOOKUP(search_key, range, index, [is_sorted])

Square brackets mark optional arguments and are not typed. Examples use English function names and comma separators; review File → Settings → Locale when comparing punctuation-sensitive formulas. Enter the original data below in A1:F9, with the Row column used only as an explanatory label. Amount and Units are numbers; other fields are text. Keep outputs outside the input table.

Row A · Item B · Team C · Status D · Amount E · Units F · Agent
1 Item Team Status Amount Units Agent
2 Pen East Paid 120 12 Ana
3 Pad West Pending 75 5 Bo
4 Box East Paid 210 7 Ana
5 Tape North Paid 90 0 Cy
6 Folder West Paid 150 3 Bo
7 Pen East Pending 60 8 Dee
8 Pad West Paid 125 12 Ana
9 Box North Pending 80 4 Cy

Two original worked examples

=HLOOKUP("Amount",A1:F9,3,FALSE)
=HLOOKUP("Team",A1:F9,2,FALSE)

Expected results are 75 and East. The index counts rows inside A1:F9, including its header row. Amount is the fourth header; row 3 of the selected table contains 75 in that column. Team is the second header; row 2 contains East.

Do not subtract the header automatically. The range you actually pass determines which row is numbered one.

Advanced check: shift the table origin

=HLOOKUP("East",A2:F9,2,FALSE)

Expected result: West. A2:F9 now starts with the first order, so its search row contains Pen, East, Paid, 120, 12 and Ana. East is in column B; the next table row contains West.

This demonstrates relative indexing, not a recommendation to use team names as stable order identifiers. A purpose-built horizontal lookup should use appropriate keys across its first row.

Advanced example: a complete horizontal inventory

On a separate sheet enter this A1:E3 table. The displayed Field/B/C/D/E header is explanatory; the three actual rows begin Code, Price and Stock. Use B1:E3 as the lookup range so its first row contains only codes.

Field B C D E
Code P-10 P-20 P-10 P-30
Price 12 18 99 25
Stock 7 0 100 9
=HLOOKUP("P-10",B1:E3,2,FALSE)
=HLOOKUP("P-30",B1:E3,3,FALSE)
=HLOOKUP("P-20",B1:E3,3,FALSE)

Expected results are 12, 9 and 0. P-10 appears twice; Google’s reference explicitly states that exact matching returns the first found match, so it selects 12 rather than 99. The zero stock for P-20 is valid stored data.

A missing P-99 returns documented #N/A. Wrapping that formula in IFNA(...,"Missing code") can make a report readable, but the same fallback can also mask a #N/A stored in the selected source cell. Inspect source data before deciding why the error appeared.

Advanced example: derive the return row from a label

For the horizontal inventory above:

=HLOOKUP("P-30",B1:E3,MATCH("Stock",A1:A3,0),FALSE)

MATCH finds Stock at relative row 3, so the expected result is 9. The label range A1:A3 and lookup range B1:E3 begin on the same worksheet row and have matching row meanings.

If the label range began at A2 instead, Stock would be position two, which would incorrectly select the Price row and return 25. A dynamically calculated index is still wrong when its origin is misaligned.

Advanced example: a horizontal threshold table

On another sheet put boundaries 0,10,20,50 in B1:E1 and labels Starter,Standard,Plus,Bulk in B2:E2. Preserve ascending numeric order across the top row.

=HLOOKUP(35,B1:E2,2,TRUE)
=HLOOKUP(35,B1:E2,2)

Both have expected result Plus, using the largest boundary no greater than 35. Exact boundary 50 and query 75 return Bulk. A query of -1 is below all boundaries and has documented #N/A.

If searching exact identifiers, explicitly use FALSE rather than relying on an unsorted approximate table. Numeric values sorted as text can appear in an order such as 1,10,100,2, which is unsuitable for numeric boundary lookup.

Product-specific restrictions and errors

The captured Google HLOOKUP reference explicitly says wildcard and regular-expression search keys are not supported. Do not import an Excel HLOOKUP wildcard example as verified Sheets behavior. For pattern-based reporting, choose an appropriately documented alternative such as QUERY and test that separate expression.

The same reference documents #VALUE! if the return index is outside 1 through the number of rows. For B1:E3, index 0 and index 4 are therefore documented #VALUE! controls. This function-specific source is the authority here; do not replace its stated error with another spreadsheet’s out-of-range convention.

Case-sensitivity, mixed-type coercion and client-specific performance are not fully certified by these examples. The reference notes a potential performance benefit for sorted approximate lookup, but semantic correctness should decide the mode before any performance claim is considered.

Product-specific verification

Related guides already published for this function: Microsoft Excel | LibreOffice Calc | Apache OpenOffice Calc | Gnumeric

A corresponding guide establishes separate documentation, not guaranteed identical defaults or file-conversion behavior. See the function comparison tool and editorial testing standards.

The full manuscript, original source table and all original formulas were reviewed on October 14, 2026. New outputs were independently modeled from explicit inputs. The previously approved availability/history section is retained exactly. No native Google Sheets execution or complete type/error matrix is claimed.