Excel

VLOOKUP

A lookup function that searches for a value in the first column of a range and returns a value from a specified column in the same row.

Examples

=VLOOKUP(A2, Products!A:C, 3, FALSE)
=VLOOKUP("SKU-001", $B$2:$D$100, 2, FALSE)

### Parameters

| Parameter | Description | |-----------|-------------| | lookup_value | The value to search for | | table_array | The table range containing the data | | col_index_num | The column number to return (1 = first column) | | range_lookup | FALSE for exact match, TRUE for approximate |

## How It Works

1. VLOOKUP searches the first column of table_array for lookup_value 2. When found, it moves right to the column specified by col_index_num 3. It returns that value

## Examples

### Basic Product Lookup

=VLOOKUP("Widget A", A:C, 3, FALSE)

This searches for "Widget A" in column A and returns the value from column C (the 3rd column).

### Employee Salary Lookup

=VLOOKUP(E2, $A$2:$D$100, 4, FALSE)

Looks up employee ID in E2 against the employee table and returns their salary (column 4).

## Common Mistakes

1. Lookup column not first: VLOOKUP can only search the leftmost column 2. Forgetting FALSE: Without FALSE, VLOOKUP may return incorrect approximate matches 3. Column index wrong: Count from the first column of table_array, not the sheet 4. Not locking ranges: Use $ to make references absolute when copying formulas

## VLOOKUP vs XLOOKUP

XLOOKUP (Excel 2021+/365) is the modern replacement:

| Feature | VLOOKUP | XLOOKUP | |---------|---------|---------| | Search direction | Right only | Any direction | | Default match | Approximate | Exact | | Error handling | Needs IFERROR | Built-in | | Return multiple columns | No | Yes |

## When to Use VLOOKUP

- Sharing files with users on older Excel versions

  • Simple, right-direction lookups
  • Legacy workbooks that already use VLOOKUP

    ## Best Practices

    1. Always use FALSE for exact matches

  • 2. Lock your table range with absolute references ($) 3. Consider switching to XLOOKUP for new workbooks 4. Use named ranges for cleaner formulas