In this guide
Appearance
Appearance
By Scot, 10+ years in IT support and helpdesk ·How these guides are checked
Type =VLOOKUP( then four things: the value to find, the range to search, the number of the column to return counting from the left edge of that range, and FALSE for an exact match. Example: =VLOOKUP(G2, $A$2:$D$50, 4, FALSE).
Checked against Microsoft 365 Roadmap, Office release notes - Current Channel and between 5 Aug 2026 and 12 Sep 2026. Nothing published in that period has been linked to this guide.
VLOOKUP finds a value in the first column of a table and returns something from another column in the same row — a price from a product code, a manager from an employee ID, a rate from a region name. This article walks you through the four arguments, the two traps that break most VLOOKUPs, and how to make the formula fail gracefully instead of filling your report with red errors.
In this guide
The examples below all use the same sheet, a tab named Price List:
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Product Code | Product Name | Category | Unit Price |
| 2 | KB-1180 | Wireless Keyboard | Peripherals | 42.00 |
| 3 | MN-2740 | 27-inch Monitor | Displays | 289.00 |
| 4 | HS-3310 | USB Headset | Peripherals | 68.50 |
| 5 | DK-4025 | Docking Station | Peripherals | 155.00 |
VLOOKUP takes four pieces of information, and every one of them has a common failure mode.
=VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)| Argument | What it means | Required |
|---|---|---|
lookup_value | The value you are searching for. A cell reference such as G2, or text in quotes such as "HS-3310". | Yes |
table_array | The block of cells to search. Excel looks for lookup_value in the first column of this range only. | Yes |
col_index_num | Which column of table_array holds the answer you want, counted from that range's left edge. 1 is the first column. | Yes |
range_lookup | FALSE for an exact match, TRUE for approximate. Excel treats a missing fourth argument as TRUE. | Technically no — always supply it |
Read out loud, a VLOOKUP says: find this value in the first column of this range, and hand me whatever sits in column number N of that same row.
Look up a unit price from a product code using a real price list.
HS-3310 and press Enter. This is the code you want a price for.=VLOOKUP(G2, A2:D5, 4, FALSE)68.50 — the value from column D on the USB Headset row.Now lock the range so you can copy the formula down without it drifting.
A2:D5 part of the formula.$A$2:$D$5. On a Mac, press Command + T if F4 adjusts screen brightness instead.=VLOOKUP(G2, $A$2:$D$500, 4, FALSE)Verification: Each row returns the price for its own product code. If every row shows the same number, the
G2reference got locked by mistake — it must stayG2, not$G$2, so it moves down with the formula.
Note: The dollar signs are what stop the range drifting one row down with every copy. If that behaviour is new to you, Understanding Absolute and Relative Cell References in Excel explains which half of a reference each one locks.
Leaving the last argument blank turns on approximate match, which returns wrong answers without warning you.
With TRUE or nothing at all in the fourth slot, VLOOKUP does not look for your value. It walks down the first column until it passes your value, then hands back the row before it — and it assumes the column is sorted A-Z. On an unsorted price list that produces a real-looking price for the wrong product, with no error to tell you.
..., 4) with no fourth argument, click into the cell, click in the formula bar, and change the ending to ..., 4, FALSE).#N/A — which is the honest answer, and Step 6 makes it presentable.Note: Approximate match has one legitimate use: banded ranges such as tax brackets, commission tiers, or postage weights, where you want "the row that covers this number". In that case sort the first column smallest to largest and use
TRUEdeliberately.
The column number counts from the first column of your range, not from column A of the sheet.
This is the single most common VLOOKUP mistake. If your range is $B$2:$E$500, then column B is 1, C is 2, D is 3, E is 4 — even though B is the second column of the worksheet.
There is a second version of the same trap. A colleague inserts a new column inside your range next week; the data shifts right, col_index_num stays at 4, and the formula quietly starts returning the Category instead of the Unit Price. Nothing turns red.
Fix it by calculating the column number from the header text instead of typing it:
=VLOOKUP($G2, $A$2:$D$500, MATCH("Unit Price", $A$1:$D$1, 0), FALSE)MATCH("Unit Price", $A$1:$D$1, 0) finds which column of the header row is labelled Unit Price and returns its position — 4 today.5 on its own. The formula keeps working.Tip: Also convert the data to a table — click any cell in it and press Ctrl + T, then OK. New rows typed at the bottom are pulled into the range automatically, so your VLOOKUP range never falls behind the data.
VLOOKUP can only return data to the right of the column it searches. Here are three ways around it.
Searching for Wireless Keyboard in column B and asking for its Product Code in column A does not work, because column A is to the left. Pick whichever fix suits the workbook:
=VLOOKUP(G2, $B$2:$D$500, 2, FALSE). The lookup column has to be first in the range, not first in the sheet.=INDEX($A$2:$A$500, MATCH($G$2, $B$2:$B$500, 0))Note: Copying the lookup column so a duplicate sits on the left also works, and it is what many shared workbooks end up doing. It costs you a column that has to stay in sync, so treat it as a last resort rather than a first move.
Replace the red #N/A errors with a message a human can read.
A #N/A means VLOOKUP searched and did not find the value. That is normal in a live workbook — a new product code, a blank row in the input column — but a column of red errors makes a report look broken and stops SUM from working further down.
IFERROR( and add your fallback text at the end:=IFERROR(VLOOKUP(G2, $A$2:$D$500, 4, FALSE), "Not in price list")Not in price list...., FALSE), "").IFNA is the sharper tool where you have it (Excel 2013 and later). It hides only #N/A and lets genuine mistakes such as #REF! stay visible:
=IFNA(VLOOKUP(G2, $A$2:$D$500, 4, FALSE), "Not in price list")Warning: Build and test the bare VLOOKUP first, then wrap it.
IFERRORswallows every error type, so a formula with a broken range or a bad column number looks exactly like a clean "no match found" — and you lose the error that would have told you.
XLOOKUP is the better function where it exists, but VLOOKUP is still the right choice for shared and older workbooks.
| VLOOKUP | XLOOKUP | |
|---|---|---|
| Which column it returns | A number you count and maintain | The actual column, selected directly |
| Direction | Right of the lookup column only | Any direction |
| Default match type | Approximate | Exact |
| Missing value | #N/A until you add IFERROR | Built-in fallback argument |
| Survives an inserted column | No | Yes |
| Available in | Every version of Excel | Microsoft 365 and Excel 2021 or later |
The same lookup written both ways:
=IFERROR(VLOOKUP(G2, $A$2:$D$500, 4, FALSE), "Not in price list")=XLOOKUP(G2, $A$2:$A$500, $D$2:$D$500, "Not in price list")Stay on VLOOKUP when any of these apply:
#NAME?.#NAME? in every XLOOKUP cell, and saving the file in that state can strip the formula.Move to XLOOKUP when everyone touching the file is on Microsoft 365 or Excel 2021 and later, and start new workbooks there. Full walkthrough: How to Use XLOOKUP in Excel.
INFO
A #N/A from VLOOKUP means "I searched and did not find it" — not that the formula is broken. Most of the time the cause is invisible on screen: a trailing space in one of the cells, or a code stored as text on one sheet and as a number on the other. Type =G2=A5 in an empty cell to compare the two directly. A result of FALSE when they look identical confirms the values differ, and wrapping the lookup value in TRIM — =VLOOKUP(TRIM(G2), ...) — clears stray spaces.
| Symptom / Error | Potential Cause | Solution |
|---|---|---|
#N/A on every row | Lookup value is not in the range's first column | VLOOKUP searches only the left-most column of table_array. Re-point the range so that column comes first, or use the INDEX and MATCH pattern in Step 5. |
#REF! | Column number is bigger than the range | col_index_num of 5 against a four-column range has nowhere to look. Widen the range or lower the number — see Step 4. |
| Right row, wrong column | A column was inserted inside the range | The stored column number no longer points where you think. Replace it with the MATCH pattern in Step 4. |
| Plausible but incorrect values | Fourth argument missing or TRUE | Approximate match returns the nearest smaller value from an unsorted list. Add , FALSE as shown in Step 3. |
| Every row returns the same answer | Lookup value locked with $ | Click the cell, and in the formula bar change $G$2 back to G2 so it moves down with the fill. |
#VALUE! | Column number is 0, negative, or text | col_index_num must be a whole number of 1 or more. Remove any quote marks around it. |
IT Tip Tuesday
Get a short, actionable IT tip in your inbox every week.
Nothing loads from beehiiv until you click. Once it does, the form sets beehiiv's own cookies and loads beehiiv's own analytics.