Ghost Sheet

VLOOKUP returns #N/A for new items? The range stops short

#N/A means the value was not found where the formula looked.

This is the task for this topic. It is part of the plan; the level check before it is free.
C2=VLOOKUP(A2,Prices!$A$2:$B$19,2,FALSE)

Click the sheet or the button: the task opens in your workspace, ready to type

ABCDE
1SKUQtyPrice
2RB-9728
3SC-39415
4GL-3186
5BN-40820
6ST-6402
7BX-20415
8LB-7543
9MK-4228
10FD-86823
11PN-2901
12MK-4227
13
14
15
16
17
dashed: the answer to reachblack: matchesblue: right after new datared: wrong

For new items the usual cause is a fixed lookup range like Prices!$A$2:$B$4 that ends above the rows you added. Look in whole columns, =VLOOKUP(A2,Prices!$A:$B,2,FALSE), and decide what an item that is truly missing should show instead of #N/A.

See it happen

Prices
AB
1SKUPrice
2TP-1102.5
3BX-2043.75
4GL-3185
5MK-4226.25
The price list. Row 5, MK-422, was added this week.
OrderC3=VLOOKUP(A3,Prices!$A$2:$B$4,2,FALSE)
ABC
1SKUQtyPrice
2BX-20443.75
3MK-4222#N/A
The formula was written when the list ended at row 4. BX-204 is found; MK-422 sits in row 5, outside the range, so C3 shows #N/A.

Three causes of #N/A, and the fix for each

CauseHow to tellFix
The range ends above the new rowsThe item is in the list, below the rangeLook in whole columns: =VLOOKUP(A3,Prices!$A:$B,2,FALSE) returns 6.25
The item really is not in the listSearch the list: it is not thereSay so instead of an error: =IFNA(VLOOKUP(A4,Prices!$A:$B,2,FALSE),"not in list")
A stray space in the value you look up=LEN(A5) is one longer than it should beTrim it: =VLOOKUP(TRIM(A5),Prices!$A:$B,2,FALSE). “GL-318␣” gave #N/A; trimmed, it returned 5

In Excel 2021 and Microsoft 365, XLOOKUP does the first two in one formula: =XLOOKUP(A3,Prices!A:A,Prices!B:B,"not in list") returns 6.25 for MK-422 and “not in list” for an item that is missing. In older versions, =INDEX(Prices!B:B,MATCH(A3,Prices!A:A,0)) is the usual alternative and also returned 6.25.

Two quieter VLOOKUP traps

Microsoft lists both in its announcement of XLOOKUP. Leave out the last argument, FALSE, and VLOOKUP does an approximate match: on an unsorted list it can return a wrong price with no error at all. And the column number, the 2 in the formula, is just a number: insert a column into the price list and the formula quietly returns the wrong column. Our engine did not reproduce the first trap on our small example, so we only describe it.

Should you hide #N/A with IFERROR?

Our view: not by default. IFERROR(…,0) turns “we don’t sell this” into a price of zero, and it also hides any other error in the formula. IFNA or XLOOKUP’s fourth argument handle only “not found”, and let you write what it means. More in #DIV/0! and IFERROR.

What Ghost Sheet doesn’t do

It cannot check the lookups in your own workbook. It has no task yet for the approximate-match or inserted-column traps.

How we checked

We ran the formulas on this page on the example data in the formula engine Ghost Sheet uses (Univer) on November 24, 2026, except where the page says we could not, and the sheets show the values it returned. That engine is not Microsoft Excel, and we have not re-run these examples in desktop Excel. One known difference: where Excel shows TRUE or FALSE, our engine shows 1 or 0.

Updated