Excel – Vlookup & Hlookup

2 min read

VLOOKUP & HLOOKUP

Excel can use lookup functions to retrieve data from a specific column or row within a table.

  • VLOOKUP returns a value from a column (vertical).
  • HLOOKUP returns a value from a row (horizontal).

Therefore, the V stands for Vertical lookup and the H stands for Horizontal lookup.

This image shows a range ready to receive a vlookup function.

Syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

Arguments

  • lookup_value
    The value to find in the first column (VLOOKUP) or the first row (HLOOKUP) of the table. This can be a cell reference or typed value.
 
  • table_array
    The table where the lookup should happen.
    • For VLOOKUP, the lookup value must be in the leftmost column of this range.
    • For HLOOKUP, the lookup value must be in the top row of this range.

 

  • Col_index_num / row_index_num
    • Which column (VLOOKUP) or row (HLOOKUP) to return from within the table_array.
    • If the index is less than 1 or greater than the number of available columns/rows, you’ll get an error (#VALUE! or #REF!).

  • [range_lookup] (optional)

    • FALSE = Exact match only.
    • TRUE or omitted = Approximate match.
      • For approximate match, the first column (VLOOKUP) or top row (HLOOKUP) must be sorted ascending; otherwise results may be incorrect

Step by Step: VLOOKUP (Vertical)

  1. Check your layout
    Ensure the value you’re looking up is in the first (leftmost) column of your table. Example: we’ll look up an Order Number to return the linked details using VLOOKUP.
  2. Create your output area
    Set aside cells where the returned values should be displayed (e.g., Item, Customer, Status).
  3. Build the function
    To return the Item (which sits in the second column of the table), use: =VLOOKUP($F$2, $A$2:$D$100, 2, FALSE)
     
  • $F$2 contains the Order Number you’re finding.
  • $A$2:$D$100 is the table range (Order Number must be column A).
  • 2 returns from the second column (Item).
  • FALSE ensures an exact match
4.Return other fields
In the next cell, change the col_index_num to return a different column (e.g., 3 for Customer):
=VLOOKUP($F$2, $A$2:$D$100, 3, FALSE)
Picture

Exact vs Approximate Match

  • Use FALSE for IDs, codes, names—anything that must match exactly.
  • Use TRUE (or omit the last argument) for banded ranges (e.g., grades, tax bands).
    • Remember: the lookup column/top row must be sorted ascending for approximate matches; if not, results can be wrong.
Was this article helpful?
Updated on January 12, 2026