SpreadsheetFormulas
error fixUNIQUEFILTERSORT

Fix the #SPILL! Error

A UNIQUE, FILTER, or SORT formula that should list multiple results shows #SPILL! instead — even though the formula itself is written correctly.

Quick formula
=UNIQUE(A2:A20)
Sample input
1Name=UNIQUE(A2:A5)
2Ana Torres#SPILL!
3Ben Okafor 
4Ana Torresold note
5Cara Lim 
Result
1Name=UNIQUE(A2:A5)
2Ana TorresAna Torres
3Ben OkaforBen Okafor
4Ana TorresCara Lim
5Cara Lim 

Excel & Google Sheets

=UNIQUE(A2:A20)

This formula works in both Excel and Google Sheets.

How it works

Dynamic array functions like UNIQUE, FILTER, and SORT return many values from one formula, spilling them into the cells below and to the right. #SPILL! means that landing zone isn't empty — even one occupied cell in the way blocks the whole result. The occupant is often invisible: a lone space, an old note, or a leftover formula. In Excel, click the #SPILL! cell and a dashed border outlines the exact range the formula needs; find the non-empty cell inside it and clear it. The formula then spills instantly with no edits needed. A second cause is asking for more room than exists: =UNIQUE(A:A) on a whole column tries to spill a million rows, so reference a bounded range like A2:A20 instead.

UNIQUE(A2:A20)
Returns every distinct value in the range, spilling one per row below the formula.
The spill range
Click the #SPILL! cell — the dashed outline (Excel) shows exactly which cells must be empty. Clear whatever occupies them.
A2:A20, not A:A
A bounded range keeps the spill a predictable size. Whole-column references can demand more rows than the sheet has room for.

When to use it

Expect #SPILL! whenever you drop a dynamic array formula into a sheet that already has content nearby — dashboards, shared trackers, or any column with stray notes below the data.

Common mistakes

  • Deleting the formula and typing results by hand.

    The formula is fine — its landing zone isn't. Clear the blocking cells (check for invisible spaces with =LEN) and the spill completes.

  • Referencing an entire column like =UNIQUE(A:A).

    That asks for up to a million spill rows and can also drag a header like "Name" into the results. Use =UNIQUE(A2:A20).

  • A stray @ in front of the function.

    =@UNIQUE(A2:A20) is the legacy implicit-intersection operator — it forces a single value instead of a spill. Remove the @.

Got a file full of these?

Open it in your browser — every error cell gets highlighted with its fix. Nothing is uploaded.

Open my spreadsheet

Did this formula help?

Engine-verified against the sample data aboveLast reviewed 2026-07-08