FormulaCraft

VLOOKUP vs HLOOKUP: vertical vs horizontal lookups

Topic:VLOOKUP
Excel & Google Sheets
=VLOOKUP(A2,B2:C6,2,FALSE)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Identify data orientation: if lookup values are in a column (vertical), use VLOOKUP; if they are in a row (horizontal), use HLOOKUP.
  2. 2VLOOKUP syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) — set range_lookup to FALSE for an exact match.
  3. 3HLOOKUP syntax: =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) — set range_lookup to FALSE for an exact match.
  4. 4In Excel 365 or Google Sheets, consider XLOOKUP as a replacement: =XLOOKUP(A2, B2:B6, C2:C6) works in either direction and does not require you to count column or row numbers.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Why does VLOOKUP return the wrong result?

The most common causes are: range_lookup left as TRUE (approximate match) when you need FALSE (exact match), the lookup column not being the leftmost column of the table, or a mismatch between text and numeric lookup values.

Should I switch to XLOOKUP?

Yes, if your Excel version supports it (Excel 365 or 2021). XLOOKUP handles left-side lookups, returns multiple columns, and manages #N/A more cleanly than VLOOKUP.

More on VLOOKUP

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: