How to fix VLOOKUP #N/A errors after filling the formula down
Formula (Excel and Google Sheets)
=VLOOKUP(A2,$D$2:$E$6,2,FALSE)Lock the table with $ before you fill: =VLOOKUP(A2,$D$2:$E$6,2,FALSE). Without it, the table range moves down with every row.
- Result on the example
- one result per row in
B2, filled down toB7 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in B2, filled down to B7. Change any input and the result updates, or edit the formula to experiment.
How it works
Filled down without $, the table D2:E6 becomes D3:E7 in the next row, then D4:E8, and rows drop off the top. P-101 sits in row 2, so from the second order on it is outside the shifted range and the lookup returns #N/A. $D$2:$E$6 stays put while A2 moves to each order.
=VLOOKUP(A2,$D$2:$E$6,2,FALSE)Result89.5
A2"P-103"The value in A2.
$D$2:$E$65 rows × 2 cols: "P-101", $39.99, "P-102", $249.00, …A range: 5 rows × 2 columns.
VLOOKUP(A2,$D$2:$E$6,2,FALSE)89.5VLOOKUP: Finds a value in the first column and returns a value from the same row. Use FALSE for exact.- lookup_value
A2"P-103" - table_array
$D$2:$E$65 rows × 2 cols: "P-101", $39.99, "P-102", $249.00, … - col_index_num
2 - range_lookup
FALSE
- lookup_value
In Google Sheets
The same formula works in Google Sheets: =VLOOKUP(A2,$D$2:$E$6,2,FALSE). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =XLOOKUP(A2,$D$2:$D$6,$E$2:$E$6) | $89.50, $39.99, $449.00… | XLOOKUP needs the same $ signs on both of its ranges. |
| =VLOOKUP(A2,$D:$E,2,FALSE) | $89.50, $39.99, $449.00… | Whole columns can't slide off the table, and they take in new rows. |
Common mistakes
- Press F4 with the range selected in the formula bar to add the $ signs.
- Lock the table, not the lookup value:
$A$2would look up the first order on every row. - Inside an Excel Table, structured references such as
Prices[SKU]don't shift at all.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Fix VLOOKUP #N/A errors after filling the formula down
B2, look up the price of the SKU in A2 from the table D2:E6, so that the formula still works when filled down to B7.Questions
Why does the first row work but not the rest?
The first row has the right range. Each later row has a range shifted one more row down.
What do the $ signs do?
A $ before the column letter or the row number stops that part from changing when the formula is copied.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.