XLOOKUP vs VLOOKUP: what changed and which to use
XLOOKUP vs VLOOKUP side by side: exact match by default, looking left, no column numbers, built-in not-found text. With formulas and when VLOOKUP still makes sense.
For data that runs across rows, with labels in the first column.
looks across, then counts down
=HLOOKUP(lookup_value, table_array, row_index_num, FALSE)
my_locationlookup_value
The value you are looking for.
✎ Trim spaces first!
tabletable_array
The whole table. The keys must be its first row.
✎ Lock it with $ ($B$1:$M$3)
table_rowsrow_index_num
Which row to return, counting from 1 at the key row.
✎ Insert a row and this number goes stale!
rulerange_lookup
FALSE for an exact match.
✎ Leave it out and you get an approximate match!
XLOOKUP vs VLOOKUP side by side: exact match by default, looking left, no column numbers, built-in not-found text. With formulas and when VLOOKUP still makes sense.
VLOOKUP searches down the first column of a table. HLOOKUP searches across the first row, for data laid out horizontally with labels in the first column.
Yes. XLOOKUP works in both directions: give it a row instead of a column and it searches across. The tool shows both formulas for your data.
No. Everything runs in your browser. Your data never leaves your device.
Know someone fighting with a spreadsheet? Send them this page.