HLOOKUP Function
Master the HLOOKUP function for horizontal table searches in Excel and Sheets. Find values across rows with examples and error fixes.



=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
Practical Examples
Basic Monthly Sales Lookup
Find sales amount for a specific month from horizontal data
Product Specification Lookup
Retrieve product specifications from a horizontal comparison table
Dynamic Quarter Revenue Lookup
Use cell reference for dynamic quarterly financial lookups
Approximate Match for Grade Boundaries
Using TRUE for approximate match in grading systems
Error Handling Implementation
Prevent #N/A errors with IFERROR wrapper
Common Errors and Solutions
HLOOKUP cannot find the lookup value
The lookup value doesn't exist in the first row of the table array
1. Verify the spelling and spacing of your lookup value 2. Check for leading/trailing spaces using TRIM() 3. Ensure data types match (text vs numbers) 4. Use IFERROR for graceful error handling
Always validate that lookup values exist in your data before using HLOOKUP
Example:
Row index number exceeds table dimensions
The row_index_num is greater than the number of rows in table_array
1. Count the actual rows in your table array 2. Ensure row_index_num doesn't exceed this count 3. Remember that row numbering starts at 1, not 0
Use ROWS() function to dynamically check table dimensions
Example:
Invalid argument type in HLOOKUP
The row_index_num is not a valid number or contains text
1. Ensure row_index_num is a positive integer 2. Check for accidental text in the row index parameter 3. Use VALUE() to convert text numbers if needed
Always use numeric values or cell references containing numbers for row_index_num
Example:
Excel doesn't recognize the formula name
HLOOKUP is misspelled or there's a syntax error
1. Check spelling: HLOOKUP (not HLOKUP or H-LOOKUP) 2. Verify all parentheses are properly paired 3. Ensure commas separate all arguments
Use Excel's formula autocomplete feature
Advanced Tips and Techniques
For large datasets (10,000+ columns), limit your table_array to only necessary columns. Instead of A1:ZZ1000, use A1:M1000 if your data only extends to column M. This can improve calculation speed by up to 70%.
Use named ranges or structured references to make your HLOOKUP formulas more maintainable. Define your table as 'SalesData' and use =HLOOKUP(A1, SalesData, 2, FALSE) for cleaner, self-documenting formulas.
Remember that HLOOKUP can only search in the FIRST row and return values from rows below. If your lookup values are in row 3, you cannot use HLOOKUP - consider transposing your data or using INDEX/MATCH instead.
Always wrap HLOOKUP in IFERROR or IFNA for production spreadsheets. This prevents ugly error messages and provides meaningful feedback to users. Example: =IFERROR(HLOOKUP(...), "Please check input data")
While the function works similarly in both platforms, Google Sheets uses 'is_sorted' instead of 'range_lookup' for the last parameter. The functionality is identical: FALSE/0 for exact match, TRUE/1 for approximate match.
Need Help with HLOOKUP Function?
Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.
Example Excel formula:
Related Formulas
Master the powerful INDEX MATCH combination. Learn flexible lookups that surpass VLOOKUP with examples and error solutions for Excel & Sheets.

Master the VLOOKUP function with practical examples and error solutions. Learn how to search and retrieve data efficiently in Excel and Google Sheets.
