WorkbookLogic
FunctionLookup and referenceintermediateVLOOKUPIF

VLOOKUP Function

By WorkbookLogic

The Excel VLOOKUP function searches the first column of a vertical table and returns a value from another column on the same row. Its match mode should always be specified explicitly.

ExcelLast reviewed Sep 11, 2026
vlookup-function-v1.0.0.xlsx
Excel VLOOKUP Function
Retrieve a value from a selected column by matching a key in the leftmost column of a vertical table.
Lookup table, editableVLOOKUP examples
Product CodeProductTierPriceExample / lookup valueReturn fieldFormula syntaxResult
P-100AtlasCore1,200P-120Product=VLOOKUP(E12,A12:D21,2,FALSE)Cedar
P-110BeaconPlus850P-160Price=VLOOKUP(E13,A12:D21,4,FALSE)1325
P-120CedarCore1,450P-140Tier=VLOOKUP(E14,A12:D21,3,FALSE)Plus
P-130DeltaBasic0
P-140EmberPlus1,100How to read the examples
P-150FlintCore760VLOOKUP searches the first column from top to bottom.
P-160GrovePlus1,325FALSE requires an exact key match.
P-170HarborBasic-100The column index selects the return field to the right.
P-180IonCore980
P-190JuniperPlus1,500
Reliability checks
P-120 returns the visible product name CedarOK
P-160 returns the visible price 1,325OK

Overview

The Excel VLOOKUP function searches down the first column of a table and retrieves a field from the matching row. It is useful for stable vertical tables, but its leftmost-key rule and approximate-match default require deliberate setup.

Quick reference

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

Returns: A value from the selected return column on the matched row. (any)

Arguments:

  • lookup_value (required) — The value to find in the first column of table_array.
  • table_array (required) — The vertical table containing the lookup column and return columns.
  • col_index_num (required) — The one-based number of the return column within table_array.
  • range_lookup (optional) — FALSE or 0 requires an exact match; TRUE, 1, or omission uses approximate matching.

The bracketed range_lookup argument is optional and defaults to approximate matching. Use FALSE or 0 for exact matching unless the first column is deliberately sorted for a threshold lookup.

Common uses

  • Retrieve a product name, price, category, or tier from a code.
  • Assign grades, rates, or bands from ascending threshold tables.
  • Enrich one table with fields stored in a vertical reference table.

Calculations

VLOOKUP scans the first column of table_array. After finding a match, it moves across the same row to the column selected by col_index_num. Column 1 is the lookup column, column 2 is the next column to its right, and so on.

With FALSE, the lookup must match exactly and the table does not need to be sorted. With TRUE or an omitted fourth argument, VLOOKUP performs an approximate match and returns the row associated with the largest first-column value less than or equal to the lookup value. Approximate lookup requires the first column to be sorted ascending.

VLOOKUP cannot return a field to the left of the lookup column. It is not case-sensitive, returns the first match when keys are duplicated, and supports * and ? wildcards in exact-match mode.

Function behavior

Situation

Behavior

Exact match

FALSE or 0 requires equality and does not require sorting.

Approximate match

TRUE, 1, or omission requires ascending first-column values and returns the next smaller threshold when no exact match exists.

Missing exact key

Returns #N/A.

Duplicate keys

Returns the first match.

Text case

Matching is not case-sensitive.

Wildcards

* and ? can be used with text in exact-match mode; ~ escapes a wildcard.

Leftward return

Not supported because return columns must be to the right of the first table column.

Invalid column index

Returns #REF! when the index exceeds the table width.

Inserted columns

A hardcoded column index can return a different field if the table structure changes.

Common errors

Omitting range_lookup

What happens:
VLOOKUP defaults to approximate matching and can return a plausible value for a key that does not exist.

Better approach:
Specify FALSE for identifiers and TRUE only for an intentionally sorted threshold lookup.

Starting table_array after the lookup column

What happens:
VLOOKUP cannot find the key because it searches only the first column of the supplied table.

Better approach:
Make the lookup field the leftmost column of table_array.

Counting worksheet columns instead of table columns

What happens:
The wrong return field is selected or the formula returns #REF!.

Better approach:
Count from the left edge of table_array, where the first column is 1.

Leaving a copied table reference unlocked

What happens:
The lookup table shifts as the formula is filled, causing missing or incorrect results.

Better approach:
Use absolute references or a structured table reference when the lookup table must remain fixed.

Example

Example 1 — Return a Product Name

=VLOOKUP(E12,A12:D21,2,FALSE)

The formula finds product code P-120 in column A and returns Cedar from column 2.

Example 2 — Return a Price

=VLOOKUP(E13,A12:D21,4,FALSE)

P-160 matches one row, and column 4 of the lookup table returns 1,325.

Example 3 — Return a Tier

=VLOOKUP(E14,A12:D21,3,FALSE)

This uses the same table but returns the third-column Tier value Plus for P-140.

Example workbook

The workbook contains a VLOOKUP Example sheet with ten editable Product Code, Product, Tier, and Price records. Three exact-match formulas return a product, price, and tier, while two checks reconcile P-120 and P-160 to the visible table. A Notes sheet explains leftmost keys, column indexes, and match modes.

Key takeaway

For identifier lookups, put the key in the table's first column, count the return column from that boundary, and set exact match explicitly with FALSE.