Looks up a value in the first column of a range and returns a value from a column to its right in the same row.
=VLOOKUP("A1", D2:F10, 3, FALSE)Returns: The value in column F of the row whose column D equals "A1"
Exact match. The 3 means return the third column of D:F, which is F.
=VLOOKUP(A2, $D$2:$F$100, 2, FALSE)Returns: Column E value matching A2
Absolute references ($) keep the table fixed when you copy the formula down.
How VLOOKUP evaluates
VLOOKUP scans down the first column of table_array looking for lookup_value, stops at the first row that matches, and returns whatever sits in column col_index_num of that row. Everything about it follows from those two facts: the search column is always the leftmost column of the range you hand it, and col_index_num is counted from that column, not from column A of the sheet. Move the range one column left and every col_index_num in the workbook shifts meaning.
The fourth argument decides which of two entirely different algorithms runs. FALSE (or 0) does a linear scan for an equal value and returns #N/A when there is none. TRUE, or leaving the argument out, does a binary-style search for the largest value less than or equal to the lookup value, which is only correct when the first column is sorted ascending. On unsorted data an approximate match does not error - it returns a confidently wrong row, which is why omitting the argument is the single most expensive habit in the function.
VLOOKUP cannot look left, cannot return more than one column at a time without help, and re-reads the lookup column for every formula you copy down. INDEX/MATCH removes the direction limit, and XLOOKUP removes both the direction limit and the dangerous default. VLOOKUP remains worth knowing because it is in every workbook written before 2021 and it is the shortest thing to type when the layout suits it.
- First match only
- The scan stops at the first matching row from the top. Duplicate keys in the first column are invisible - there is no argument that returns the last match or counts how many rows matched.
- Case-insensitive text
- "WEST", "West" and "west" are the same key to VLOOKUP. If case has to matter, you need a different construction such as INDEX with MATCH over EXACT.
- Numbers stored as text
- A lookup value of 1024 will not match a cell holding the text "1024". They compare as different types, so the result is #N/A even though the two cells look identical on screen. Fix the data type in the column rather than adding a coercion to every formula.
- Blank result cells
- When the matched row has an empty cell in the return column, Excel returns 0, not a blank. Wrap the call in an IF that tests for an empty result if the difference matters in a report.
- Wildcards in exact mode
- With range_lookup FALSE, * matches any run of characters and ? matches exactly one, so =VLOOKUP("ACME*", A:C, 3, FALSE) finds the first key beginning with ACME. Prefix a literal asterisk or question mark with ~ to search for it.
- Approximate match needs a sort
- With TRUE, the first column must be sorted ascending. VLOOKUP walks until it passes the lookup value and returns the row before it, so an out-of-order column silently truncates the search early.
Errors VLOOKUP returns
=VLOOKUP(TRIM(A2), Products!$A$2:$D$500, 4, FALSE)Returns: Column D of the matching product row
TRIM on the lookup value absorbs the trailing spaces that pasted keys usually carry. The sheet name makes the table explicit so the formula survives being copied to another tab.
=VLOOKUP(B2, $A$2:$C$8, 3, TRUE)Returns: The band the score in B2 falls into
The deliberate use of approximate match: A2:A8 holds ascending band floors (0, 60, 70, 80, 90) and C holds the label. Any score picks the last floor it is at or above.
=VLOOKUP($A2, $D$2:$H$200, COLUMNS($D$2:E$2), FALSE)Returns: The next table column each time you copy right
COLUMNS grows from 2 to 3 to 4 as the formula is dragged across, so one formula fills a whole block without hand-editing col_index_num.
Does VLOOKUP Work in Google Sheets?
Yes. VLOOKUP uses the same syntax in Google Sheets and LibreOffice Calc, so you can paste these formulas straight across.
In the ExcelTool editor
The ExcelTool editor implements VLOOKUP with three or four arguments and matches Excel's default: leave range_lookup out and the lookup is approximate, exactly as in Excel.
Exact match is case-insensitive, and a lookup value containing * or ? is treated as a wildcard pattern with ~ as the escape character. Approximate match skips blank keys and stops at the first key greater than the lookup value, so the first column must be sorted ascending.
A col_index_num below 1 returns #VALUE! and one wider than the table returns #REF!. Where Excel turns a matched-but-empty return cell into 0, the editor leaves it blank.
You can try any of these formulas in the free in-browser spreadsheet editor - it opens .xlsx files, recalculates as you type, and needs no signup.