formulastreak

VLOOKUP #SPILL! error: how to fix it

Updated · Checked on a live sheet · Excel and Google Sheets

The most likely fix

A VLOOKUP whose lookup value is a range spills one result per value. If that range is a whole column, or a cell below is in use, you get #SPILL!. Look up only the cells you need (A2:A7), or use the value on the same row and fill down.

Fix it yourself

The formula in D2 shows the problem. Edit it to the fixed version and watch the sheet recalculate.

A note in D5 blocks the eight results the lookup wants to spill · edit D2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultD2 = #SPILL!
ABCDEFGHIJ
1OrderSKUQtyProductSKUProductPriceStock
22001PL-1042#SPILL!PL-101Fern$9.5040
32002PT-2101PL-104Monstera$34.0012
42003TL-3013PL-107Snake plant$22.0025
52004PL-1011notePT-210Terracotta pot$12.5060
62005SL-4014PT-212Ceramic pot$19.0018
72006PL-1041TL-301Watering can$18.009
82007PT-2122SL-401Potting mix$7.2580
92008PL-1071

Shows the problem

=VLOOKUP(B2:B9,$G$2:$H$8,2,FALSE)

Fixed

=VLOOKUP(B2,$G$2:$H$8,2,FALSE)

Causes, most likely first

  1. 1The lookup value is a whole column

    Microsoft's #SPILL! page uses this exact case: placed in E2, =VLOOKUP(A:A,A:C,2,FALSE) used to look up only A2, but in dynamic-array Excel it looks up the entire column, returns 1,048,576 results and hits the end of the grid. Older workbooks often contain it.

    Wrong

    =VLOOKUP(A:A,A:C,2,FALSE)

    Fixed

    =VLOOKUP(A2:A7,A:C,2,FALSE)
  2. 2Something blocks the results

    A bounded lookup range spills one result per value, so it needs that many empty cells below. In the sheet above a note in D5 is in the way. Delete it, or switch to the fill-down version.

    Wrong

    =VLOOKUP(B2:B9,$G$2:$H$8,2,FALSE)

    Fixed

    =VLOOKUP(B2,$G$2:$H$8,2,FALSE)
  3. 3Which of Microsoft's three fixes to use

    Reference only the lookup values (A2:A7): one formula, a dynamic array, but not inside Excel tables. Reference the value on the same row (A2) and copy down: works in tables, no spill. Or ask for the old behaviour with @A:A and copy down: also works in tables. Choose the first outside tables and the second inside them; @ is mostly for fixing old files without rewriting them.

    Wrong

    =VLOOKUP(A:A,A:C,2,FALSE)

    Fixed

    =VLOOKUP(@A:A,A:C,2,FALSE)
  4. 4The formula is in a table

    Spilled array formulas aren't supported in Excel tables, so any version that spills shows #SPILL! there. Use the same-row version, or move the formula out of the table (Table Design › Tools › Convert to range turns the table into a normal range).

  5. 5XLOOKUP and other lookups spill too

    The same rules apply to XLOOKUP, INDEX/MATCH and HLOOKUP: give them a range of lookup values and they return one result per value. A whole-column lookup value in any of them hits the edge of the sheet the same way.

    Wrong

    =XLOOKUP(A:A,G:G,H:H)

    Fixed

    =XLOOKUP(A2:A7,G:G,H:H)

Stop it happening again

For new formulas, decide up front: a bounded range for one spilling lookup (outside tables), or the same-row lookup filled down (inside tables and in files shared with older Excel versions). Avoid whole-column lookup values entirely. Keep the cells below a spilling formula empty, and give each spilled result room to grow. When you inherit an old workbook that suddenly shows #SPILL!, adding @ in front of the whole-column reference restores the old behaviour quickly, and you can rewrite it properly later. XLOOKUP spills the same way, so the same rules apply.

Questions

What does the @ in a formula mean?

It's the implicit intersection operator: it asks Excel for a single value from a range, the old behaviour. Microsoft's #SPILL! page offers it as one of the three fixes for whole-column lookups, to be copied down like a classic formula.

Can one VLOOKUP return a whole column of results on purpose?

Yes: give it a bounded range of lookup values, like VLOOKUP(B2:B9, $G$2:$H$8, 2, FALSE), with empty cells below it. That's a single formula for the whole column, and it updates when the keys change.

In Google Sheets

Google Sheets doesn't use #SPILL! (it isn't in the list of error values in Google's ERROR.TYPE help), and we haven't found an official Google page on how a VLOOKUP with a range as its search key behaves there. The same-row version filled down works in both apps, which makes it the safest choice for shared files.

Why this happens

Before dynamic arrays, Excel silently used only the value on the formula's own row when a function expected one value but got a column (implicit intersection). Dynamic-array Excel returns all of them instead, which is powerful for bounded ranges and a #SPILL! for whole columns. The #SPILL! error page lists every cause; the VLOOKUP vs XLOOKUP guide covers lookups in general.

Practise this in 5 minutes

VLOOKUP is taught in Lesson 15: VLOOKUP (Unit 4, Lookups), on a live sheet with instant feedback. Pro

Open “VLOOKUP”

Get the formulastreak newsletter

Bite-sized formula tips you can use at work the next day, plus a heads-up when new free tools and lessons land. It arrives now and then, never in a flood.

No spam, unsubscribe in one click. We store your email, this consent and when you gave it. Details in our privacy policy.

Need a quick reference? The formula cheat sheet is free to read and print.