VLOOKUP Returns the Wrong Column After You Insert a Column

After a column insert, VLOOKUP can still look fine while a hard-coded column index returns Quantity instead of Amount. Point MATCH at the header, or use XLOOKUP.

本文目录

The Amount for binder clips used to land in the result cell as 48.50. After someone slipped a Bin column into the catalog, the same VLOOKUP still shows a number, and there is no # error. The number is 12, which is the quantity.

This is not the missing-FALSE problem. The third argument, col_index_num, is a frozen count from the first column of the range, not a header name. Inserting a column can widen the range and still leave that 4 untouched. These results were measured in Google Sheets. I did not re-run the inserts in Excel.

The catalog, then a working lookup

Enter this in A1:D10. Type the amounts as ordinary numbers and format D2:D10 to two decimal places. Put the lookup SKU A-104 in F2.

SKUNameQtyAmount
A-104Binder clip1248.50
A-119Manila folder4016.00
B-203Stapler643.50
B-210Tape dispenser827.20
C-301Desk tray436.00
C-308Letter opener159.75
D-401Push pins1006.40
D-416Rubber bands504.25
E-502Shipping labels2018.90
=VLOOKUP(F2,A2:D10,4,FALSE)

Column 4 of A2:D10 is Amount, so A-104 returns 48.50.

If this formula already returns a neighbor’s amount for a SKU that is not in the list, that is the approximate-match default, not a column insert. See VLOOKUP 返回错误值?近似匹配陷阱与其他 4 个原因.

A new column between Name and Qty

Select column C (Qty) and insert one column to the left. Put Bin in C1. You can leave the bin cells blank. Amount now sits in column E.

The formula I had in G2, =VLOOKUP(F2,A2:D10,4,FALSE), became:

=VLOOKUP(G2,A2:E10,4,FALSE)

The range widened from A2:D10 to A2:E10. The 4 stayed 4. The lookup cell also moved, from F2 to G2, because the new column was inserted to the left of it. G2 now shows 12 — Qty, which is the fourth column of the widened range — with no error.

That is the failure this page is about: a quiet wrong field, not #REF!.

Inserts that do not change the field

Start each of these from a fresh copy of the original four-column table and the original formula =VLOOKUP(F2,A2:D10,4,FALSE).

Insert a column at A, to the left of SKU. Every reference in that formula shifted one column right, to =VLOOKUP(G2,B2:E10,4,FALSE). The 4 still counted to Amount, and the result was still 48.50. Read the formula bar; the addresses you typed will not still be there.

Insert a column at E, immediately to the right of Amount. The range and the 4 were unchanged, and the result was still 48.50. The lookup cell itself moved again, because that new column sits to the left of F, so the formula became =VLOOKUP(G2,A2:D10,4,FALSE).

Only an insert inside the range, to the left of the return column, changes which field the 4 counts.

Deleting Amount is a different error

On a fresh copy of the original table, delete the Amount column. The formula became =VLOOKUP(E2,A2:C10,4,FALSE) and returned #REF!: “VLOOKUP evaluates to an out of bounds range.” The 4 is now wider than the three-column range that remains. That write-up is VLOOKUP out of bounds.

Point at the header, or drop the column number

Two repairs survive the mid-column insert. After Bin is in place (Amount in E):

=VLOOKUP(G2,A2:E10,MATCH("Amount",A1:E1,0),FALSE)

MATCH("Amount",A1:E1,0) returned 5. VLOOKUP then returned 48.50 again. If someone inserts another column later, the match moves with the header.

=XLOOKUP(G2,A2:A10,E2:E10)

That also returned 48.50. An XLOOKUP written before the insert, as =XLOOKUP(F2,A2:A10,D2:D10), rewrote to =XLOOKUP(G2,A2:A10,E2:E10) when Bin was inserted, and the result stayed 48.50. XLOOKUP has no column index.

=INDEX(E2:E10,MATCH(G2,A2:A10,0))

This returned 48.50 as well, and does not need a column number either. A side-by-side of the three functions is in XLOOKUP vs INDEX MATCH vs VLOOKUP.

Several SKUs at once

After the Bin column is in place, put A-104, B-203, and E-502 in G2:G4:

=ARRAYFORMULA(VLOOKUP(G2:G4,A2:E10,4,FALSE))

That spilled 12, 6, and 20 — still the fourth column, Qty. Switching the 4 to MATCH("Amount",A1:E1,0) spilled 48.50, 43.50, and 18.90. Leave empty cells under the formula so the spill has room; a blocked spill in this file returned #REF!, “Array result was not expanded because it would overwrite data in H11.”

A wrong value with no # sign also appears in the lookup overview, under the “wrong value, no error” row: Excel & Google Sheets Lookup Errors.

Sources

Oscar

写 Excel 与 Google Sheets 的公式和排错。

Google Sheets, 1 December 2026, new private unshared spreadsheet (locale en_US, 1000-row grid, America/New_York). Formulas were entered as user input through the Sheets API. Amounts in D2:D10 formatted 0.00. Before the insert, VLOOKUP(F2,A2:D10,4,FALSE) for A-104 returned 48.50. After a column was inserted at C (Bin), that formula rewrote to VLOOKUP(G2,A2:E10,4,FALSE) and returned 12. Inserting a column at A rewrote it to VLOOKUP(G2,B2:E10,4,FALSE) and still returned 48.50. Inserting a column at E (right of Amount) rewrote it to VLOOKUP(G2,A2:D10,4,FALSE) and still returned 48.50. Deleting Amount rewrote it to VLOOKUP(E2,A2:C10,4,FALSE) and returned #REF!, "VLOOKUP evaluates to an out of bounds range." After the mid-column insert, MATCH("Amount",A1:E1,0) returned 5; VLOOKUP with that MATCH, XLOOKUP(G2,A2:A10,E2:E10), and INDEX/MATCH each returned 48.50. An XLOOKUP written as XLOOKUP(F2,A2:A10,D2:D10) before the mid-column insert rewrote to XLOOKUP(G2,A2:A10,E2:E10) and stayed 48.50. ARRAYFORMULA of VLOOKUP on A-104, B-203, and E-502 with a frozen 4 returned 12, 6, and 20; with MATCH of Amount it returned 48.50, 43.50, and 18.90. Excel was not run.

本主题下一篇:查找与条件求和 XLOOKUP Approximate Match Returns the Wrong Tier