Pepelen

Choose the right lookup tool for the job: HLOOKUP for rows, INDEX+MATCH as the all-purpose option, XLOOKUP in newer versions.

1 / 6

Three lookup tools: HLOOKUP, INDEX+MATCH, XLOOKUP

When VLOOKUP isn't enough: other lookup tools

HLOOKUP is the horizontal counterpart of VLOOKUP. VLOOKUP searches the first column of a table and takes the result from a column to the right; HLOOKUP searches the first row and returns a value from a row below. The syntax is almost identical: =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]). Use it when the lookup table runs horizontally — across rows rather than down columns. INDEX+MATCH is a powerful pair of functions that looks up in any direction and doesn't break when you insert columns. MATCH finds the position of a value in a range, and INDEX returns the value at that position. The pattern: =INDEX(result_column, MATCH(lookup_value, lookup_column, 0)). The third argument of MATCH, 0, is what gives you an exact match. This all-purpose solution works in every version of Excel. XLOOKUP is the modern replacement for VLOOKUP. Syntax: =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], ...). It can look both right and left, return a whole column, and take a default value when nothing is found. It's available in Microsoft 365 and Excel 2021 and 2024, but not in Excel 2016 or 2019. That's why INDEX+MATCH remains an important fallback for compatibility.
Lesson notes
When VLOOKUP isn't enough: other lookup tools
HLOOKUP is the horizontal counterpart of VLOOKUP. VLOOKUP searches the first column of a table and takes the result from a column to the right; HLOOKUP searches the first row and returns a value from a row below. The syntax is almost identical: =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]). Use it when the lookup table runs horizontally — across rows rather than down columns. INDEX+MATCH is a powerful pair of functions that looks up in any direction and doesn't break when you insert columns. MATCH finds the position of a value in a range, and INDEX returns the value at that position. The pattern: =INDEX(result_column, MATCH(lookup_value, lookup_column, 0)). The third argument of MATCH, 0, is what gives you an exact match. This all-purpose solution works in every version of Excel. XLOOKUP is the modern replacement for VLOOKUP. Syntax: =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], ...). It can look both right and left, return a whole column, and take a default value when nothing is found. It's available in Microsoft 365 and Excel 2021 and 2024, but not in Excel 2016 or 2019. That's why INDEX+MATCH remains an important fallback for compatibility.
HLOOKUP, INDEX+MATCH, and XLOOKUP — Excel from Scratch: Formulas, Functions, and Data Analysis