Excel Practice Test

โ–ถ

The Excel #SPILL! error appears in Microsoft 365 and Excel 2021 when a dynamic array formula tries to spill its results into multiple cells but something is blocking the spill range. Dynamic arrays are the modern Excel feature where a single formula in one cell produces results that automatically fill multiple adjacent cells. Functions like FILTER, SORT, UNIQUE, SEQUENCE, RANDARRAY, and several others all use dynamic arrays. When the spill range contains blocking content โ€” text, numbers, formulas, or merged cells โ€” Excel can't produce the spilled output, so it shows #SPILL! instead of the actual results you expected.

This guide walks through what dynamic array formulas are, what causes the SPILL error in each common scenario, how to find the cell that's blocking the spill range, the specific fixes for each cause, the differences between Excel versions (older Excel doesn't support dynamic arrays at all and so doesn't produce SPILL errors), the @ implicit intersection operator that lets you opt out of dynamic-array behavior in some cases, and the broader workflow for using dynamic arrays without running into SPILL errors regularly.

The simplest way to think about SPILL errors: if you write =FILTER(A1:A10, A1:A10>5) in cell C1 and the function would normally produce 5 results spilling into C1:C5, but C3 already contains text or a number, the spill is blocked. Excel doesn't overwrite existing content silently โ€” it shows #SPILL! to alert you that something is wrong, and you have to either clear the blocking content or move the formula somewhere with empty cells available for the spill output.

Dynamic arrays were introduced to Microsoft 365 in 2020 and became part of Excel 2021. Older versions (Excel 2019, 2016, 2013, etc.) don't support dynamic arrays and don't produce SPILL errors because the underlying behavior doesn't exist. If you're seeing SPILL errors in a workbook you opened, you're using a current version of Excel. If a colleague using older Excel opens your dynamic-array workbook, they see static legacy results without the spill behavior, often producing different output than your current Excel session.

For Excel users new to dynamic arrays, the SPILL error is one of the most visible signs that something has changed since older Excel versions. The error message is informative if you know what it means but cryptic if you don't. The good news is that fixing SPILL errors is usually quick once you understand what's happening โ€” clear the blocking cell, the spill output appears, and the formula works as intended. Most SPILL errors resolve in seconds rather than requiring deep debugging like some other formula error types do in everyday work.

Excel SPILL error at a glance

What it means: a dynamic array formula tried to spill results into multiple cells but something is blocking the spill range. Common causes: existing content in the cells where output would appear, merged cells in the spill range, table boundary issues, or insufficient space at the edge of the worksheet. How to find blocker: click the small green warning sign next to the cell, hover over "Select Obstructing Cells" to highlight what's blocking. How to fix: clear blocking cells, move the formula to empty space, or rewrite to constrain output size. Versions: Excel 365 and Excel 2021 only.

What dynamic array formulas are

Dynamic arrays are formulas that automatically produce multiple results from a single formula entry. Instead of needing one formula per cell, you write one formula and Excel handles spreading the output across as many cells as the result requires. Common dynamic array functions include FILTER (returns rows matching criteria), SORT (sorts a range), UNIQUE (returns distinct values), SEQUENCE (generates sequential numbers), RANDARRAY (generates random numbers), and XLOOKUP (modern lookup that can return arrays). Older Excel functions like SUMIF and VLOOKUP can also produce array output in some patterns.

The formula lives in a single "anchor" cell. The output spreads โ€” "spills" โ€” into the surrounding cells. The spill range has a thin blue border to indicate the formula's output area. Click any spilled cell and the formula bar shows the formula in gray, indicating it's part of a spill but not the anchor. Click the anchor cell (top-left of the spill) and the formula bar shows the formula normally. Editing the formula always happens at the anchor; the spilled cells can't be edited individually because they're computed outputs of the anchor formula.

The spill range automatically resizes when the input data changes. If you add new rows to a source range that FILTER is reading, the spill range grows to include the new matching rows. If you remove rows, the spill range shrinks. This dynamic behavior is the key advantage of dynamic arrays over the older array formulas (Ctrl+Shift+Enter array formulas) where you had to pre-allocate fixed output ranges. Modern dynamic arrays are more flexible and easier to maintain over time as data evolves.

The spill behavior is what produces SPILL errors when blocked. If a dynamic array formula needs 5 rows of output but only 3 rows are empty before hitting an existing value, Excel can't produce the full spill. Rather than overwriting the blocking content silently, Excel shows #SPILL! at the anchor cell and refuses to spread the output. The behavior protects existing data from accidental overwriting while alerting you that the formula needs a different location or different input to work correctly in the current sheet layout.

Common causes of SPILL errors

๐Ÿ”ด Blocking cell content

The most common cause. A dynamic array formula needs to spill into a range, but one or more cells in that range already contain text, numbers, formulas, or other content. Excel won't overwrite existing content automatically, so it shows #SPILL! at the anchor cell. Fix: clear the blocking cells and the spill will materialize. Click the green warning indicator next to the anchor cell and use 'Select Obstructing Cells' to highlight the blocker.

๐ŸŸ  Merged cells in spill range

Merged cells can't be split by a spill, so any merged cell in the target spill range produces a SPILL error. Even a single merged cell is enough to block the entire spill regardless of how many other cells in the range are empty. Fix: unmerge the cells in the target range using Home โ†’ Merge & Center button (or the dropdown's Unmerge option). The merge functionality on the cells doesn't affect spilled cells but does block dynamic array output.

๐ŸŸก Excel Table boundary

Dynamic array formulas don't work cleanly inside Excel Tables (created with Insert โ†’ Table or Ctrl+T). The Table's structured behavior conflicts with the spill range's auto-resizing. Fix: either move the dynamic array formula outside the table to a regular range, or convert the table back to a normal range using Table Tools โ†’ Design โ†’ Convert to Range. The conflict between tables and dynamic arrays is a known limitation in current Excel versions.

๐ŸŸข Insufficient space at edge of sheet

If a dynamic array formula in column XFD (the last column) needs to spill rightward but there's no column XFE, Excel produces SPILL because there's no room. Same for formulas at row 1048576 needing to spill downward. Rare in practice because most users don't anchor formulas at the worksheet edges, but worth knowing as one of the SPILL error causes when it does happen during unusual layout work.

๐Ÿ”ต Volatile spill size

Some dynamic array functions produce different output sizes on each calculation, which can cause SPILL when the new output doesn't fit. RANDARRAY with volatile inputs is the typical case. Fix: pin the array size with explicit row/column arguments (e.g., RANDARRAY(10, 5)) so the spill range stays consistent across recalculations rather than fluctuating with random inputs.

๐ŸŸฃ Circular reference attempts

If the spill output would overlap with the input range that the formula reads, Excel shows SPILL because of the circular dependency. Example: =SORT(A1:A10) entered in A5 โ€” the formula reads A1:A10 but tries to spill starting at A5, which would overlap the input range. Fix: move the formula to a non-overlapping location or change the input range to avoid the conflict during the formula evaluation.

How to find the blocking cell

Excel's UI provides a built-in way to identify what's blocking a spill. When you see a #SPILL! error, click the cell containing the error. A small green warning indicator appears at the corner of the cell with a dropdown arrow. Click the dropdown to see options including What's wrong with this formula? and Select Obstructing Cells. Click Select Obstructing Cells and Excel highlights the specific cells in the would-be spill range that are blocking the output.

The Select Obstructing Cells action lets you immediately see what content needs to move or be cleared for the spill to succeed. In most cases the blocker is something obvious โ€” a leftover label, an old number, or formatting that included content. Clearing the highlighted cells (press Delete after selection) typically resolves the SPILL error immediately. The formula re-evaluates as soon as the blocking cells are clear, and the spill output appears with the data it should have produced originally.

If the dropdown isn't visible, sometimes Excel hides the warning indicator depending on display settings. The same information is available through the formula bar โ€” when you select the SPILL cell, the formula bar shows the formula. You can also press F2 to enter edit mode on the formula and see the spill range it's attempting to produce. The spill range visualization (thin blue border around the intended output area) appears even when blocked, so you can see where the spill should go and identify the conflicting cells visually within that range.

For complex spreadsheets with many SPILL errors at once, working through them systematically helps. Start with the formula closest to your input data and work outward โ€” sometimes one block cascades into others. Clearing one blocker may resolve multiple SPILL errors if they were chained together through interdependent formulas. Save the workbook periodically as you fix SPILL errors so you can recover if a fix produces unintended consequences elsewhere in the sheet during the cleanup process.

Common SPILL scenarios and fixes

๐Ÿ“‹ Existing content in spill range

Most common scenario. A formula like =FILTER(A1:A10, A1:A10>5) entered in C1 needs to spill into C1:C5, but C3 already contains a value. Click the green warning indicator on the SPILL cell, choose Select Obstructing Cells, and Excel highlights C3. Clear C3 with Delete and the spill resolves. The same pattern works for any dynamic array formula whose intended output area has prior content that needs to be cleared first.

๐Ÿ“‹ Merged cells blocking spill

Merged cells can't be split by a dynamic array spill. If your spill range includes any merged cell, you get SPILL. Fix: select the target range, click Home โ†’ Merge & Center โ†’ Unmerge Cells (or click the dropdown arrow next to Merge & Center for the Unmerge option). Even one merged cell is enough to block the entire spill regardless of other empty cells. Avoid merged cells in any worksheet area where you plan to use dynamic array formulas.

๐Ÿ“‹ Excel Table conflicts

Excel Tables have their own auto-resize behavior that conflicts with dynamic array spill ranges. If you try to put a dynamic array formula inside an Excel Table, you typically get SPILL or other errors. Fix: either move the formula to a regular range outside the table, or convert the table to a regular range via Table Tools โ†’ Design โ†’ Convert to Range. The conflict is a known limitation of current Excel; future updates may improve table-and-dynamic-array compatibility but the conflict is real today.

๐Ÿ“‹ Random size on recalculation

RANDARRAY without explicit size arguments produces a different array size on each recalculation, which can fit into the surrounding cells one moment and produce SPILL the next. Fix: always specify the rows and columns explicitly: =RANDARRAY(10, 5) instead of =RANDARRAY(). The explicit size keeps the spill range stable across recalculations rather than fluctuating with each F9 press or formula update across the sheet during normal operation.

๐Ÿ“‹ Self-referential spill

If a dynamic array formula's spill range overlaps its own input range, Excel produces SPILL because the formula would feed back into itself. Example: =UNIQUE(A1:A10) entered in A5. The formula reads A1:A10 but spill starts at A5, which would write into the input range. Fix: move the formula to a column or row that doesn't overlap with the input. The general rule: place dynamic array formulas in fresh empty space rather than within or adjacent to their own input ranges.

The @ implicit intersection operator

Modern Excel includes the @ implicit intersection operator that lets you tell Excel "return only a single value, not an array" for formulas that would otherwise spill. Adding @ before a function or range name forces the formula to behave like older Excel โ€” returning a single cell value rather than spilling. This is sometimes the right answer when you want to use dynamic-array-aware functions but in a single-cell context where the spill behavior is unwanted.

The @ operator appears automatically when Excel converts older formulas to the new dynamic array engine. Files saved in Excel 2019 or earlier that contain implicit intersection formulas get @ added to those formulas when opened in Excel 365 or 2021 to preserve their original behavior. Most users don't manually add @ symbols; Excel handles the conversion automatically when opening older workbooks. Understanding what the @ does helps you read formulas in older files and modify them confidently when needed.

For new formulas you're writing in Microsoft 365, use @ when you specifically want single-value behavior from a function that could otherwise produce an array. Example: =@INDEX(A1:A10, B1) with @ explicitly forces single-cell output. The same formula without @ would behave the same way as long as B1 is a single value, but the @ makes the intent explicit and prevents the formula from spilling unexpectedly if you later modify the input to be a range that would normally produce array output.

The @ operator doesn't fix SPILL errors directly. If you have a formula that's producing SPILL, adding @ doesn't usually help because @ converts an array-producing formula into a single-value formula, which often isn't what you wanted in the first place. The proper fix for SPILL is usually to clear blocking cells or move the formula to empty space. Use @ when you're writing new formulas and want to opt out of dynamic-array behavior, not as a band-aid for SPILL errors caused by spill-range conflicts.

How to use dynamic arrays without producing SPILL

The cleanest way to avoid SPILL errors is to plan ahead for the spill range when writing dynamic array formulas. Anchor your formula in an empty area of the worksheet with enough surrounding empty cells to accommodate the maximum spill size. For functions like FILTER that return varying numbers of rows depending on the data, leave plenty of empty rows below the anchor. For functions like SORT that return the same number of rows as input, plan based on the input range size.

Another approach is to use dynamic arrays in conjunction with Excel Tables for the input data. If your input range is a Table column, the dynamic array formula reads the entire column dynamically โ€” adding rows to the Table automatically expands what the formula sees. This pattern works well for data lists that grow over time. The spill output goes into a regular range adjacent to (or far from) the Table rather than inside the Table itself, which avoids the table-and-dynamic-array conflict that produces SPILL when both are mixed in the same area of the worksheet.

For dashboards or reports where you want predictable output sizes, consider using TAKE or DROP functions to constrain the spill output. =TAKE(SORT(A1:A100), 10) takes only the top 10 rows of the sorted result, regardless of how many input rows there are. This gives you a fixed-size output suitable for layout planning. Combined with FILTER, you can produce "top 10 highest-value records" or similar patterns with predictable output sizes that don't produce SPILL errors as input data fluctuates over time.

For workbooks that mix new dynamic array work with legacy formulas, keep them in separate ranges. Don't try to put dynamic array formulas next to traditional array formulas in the same area โ€” the interactions are confusing and produce unpredictable behavior. Use modern dynamic arrays for new work in fresh ranges, leave legacy array formulas where they are if they still work, and consider whether the legacy formulas should be modernized to dynamic arrays as time permits during workbook maintenance cycles.

Excel SPILL error โ€” checklist

Identify the cell showing #SPILL! and click the green warning indicator next to it.
Choose Select Obstructing Cells from the warning dropdown to highlight the blocker.
Clear the blocking cells with Delete (or move them elsewhere if data is needed).
Verify the spill resolves once the blocker is removed.
If the blocker is a merged cell, unmerge it via Home โ†’ Merge & Center dropdown.
If the formula is inside an Excel Table, move it outside or convert the table to a range.
Plan dynamic array formula placement with sufficient empty cells for the expected spill size.
Use TAKE or DROP to constrain spill output to fixed sizes when needed for layout.
Avoid placing dynamic array formulas adjacent to or overlapping their own input ranges.
Save the workbook after fixing SPILL errors to confirm the resolution holds.

One useful workflow for working with dynamic arrays is to develop the formula in a temporary scratch area of the worksheet first, verify the output looks correct, then move it to its production location.

The scratch area approach lets you see what the spill range will look like and choose a production destination with enough empty space, avoiding SPILL errors that would otherwise pop up when you place the formula in a busier area of the workbook. The slight extra effort is worth it for complex dynamic array formulas where the output size or structure isn't immediately obvious from reading the formula.

Try an Excel practice test

SPILL vs other error types

Excel has multiple formula error types, and understanding which one you're seeing helps with debugging. #SPILL! specifically means a dynamic array formula was blocked from spilling. #REF! means a formula references a cell that no longer exists (deleted row/column). #VALUE! means a formula encountered an unexpected data type.

#NAME? means Excel doesn't recognize a function or named range (often the case when an Excel 365 function is opened in older Excel that doesn't have it). #DIV/0! means division by zero. #N/A means a lookup didn't find a match. #CALC! means a calculation isn't supported (often related to dynamic arrays or computed table interactions).

SPILL is unique to dynamic array formulas. If you're not using dynamic arrays, you won't see SPILL. If you're using a function that should produce a dynamic array (FILTER, SORT, UNIQUE, etc.) and seeing a different error type, the diagnosis is different. #NAME? on FILTER means you're in an older Excel version. #VALUE! on FILTER means an argument has the wrong type. #N/A on FILTER means no rows match the criteria (with the optional third argument controlling fallback behavior). The error type guides the diagnosis precisely if you know what each one signals.

For workflow troubleshooting, focus on SPILL errors first because they're the easiest to diagnose and fix once you understand the cause. The green warning indicator and Select Obstructing Cells feature give you exactly the information needed to resolve the issue. Other error types require more investigation into the formula's logic, the source data, or the Excel version. Most SPILL errors fix in seconds once identified; other error types sometimes take meaningful debugging time depending on the specific formula and data involved.

One subtlety: a SPILL error can mask other errors. If your dynamic array formula has a deeper problem (wrong arguments, missing data, etc.) but the formula is also being blocked from spilling, Excel might show SPILL as the visible error. Once you fix the SPILL by clearing blockers, a different error might appear if the formula has additional issues. The pattern is: fix the most visible error first, then re-evaluate the formula state and address any remaining issues that surface after the initial fix during normal worksheet operation.

Excel SPILL error โ€” quick reference

365 / 2021
Excel versions affected
Blocking content
Most common cause
Green warning indicator
Diagnosis tool
FILTER, SORT, UNIQUE
Common dynamic functions

Common dynamic array functions that can produce SPILL

๐Ÿ”ด FILTER

Returns rows from a range that match specified criteria. =FILTER(A1:C100, A1:A100>10) returns all rows where column A exceeds 10. The output size depends on how many rows match โ€” usually variable. Common cause of SPILL when used in busy worksheets where the variable output size isn't planned for. Place FILTER formulas in empty areas with plenty of room to accommodate maximum match count.

๐ŸŸ  SORT and SORTBY

Sort a range. =SORT(A1:A100) returns the values from A1:A100 sorted ascending. Output size matches input size, so plan for the same number of cells as input. SORTBY adds the option to sort by a different column than the values returned. Both produce SPILL when the output range is blocked, with the same diagnosis and fix patterns as other dynamic array functions across the workbook.

๐ŸŸก UNIQUE

Returns distinct values from a range. =UNIQUE(A1:A100) returns the unique values in A1:A100. Output size depends on how many unique values exist โ€” typically smaller than input but variable. Common in cleanup workflows where you want to deduplicate a list. Place in empty area with room for the unique-count, which may be hard to estimate in advance for unfamiliar data sources.

๐ŸŸข SEQUENCE and RANDARRAY

Generate sequential or random numbers. =SEQUENCE(10) returns 1 through 10 in a column. =RANDARRAY(5, 3) returns a 5ร—3 array of random values. Output size is fixed by arguments, making these the easiest dynamic array functions to plan for in terms of spill range. Still produce SPILL if the target range has blocking content, just like other dynamic array functions across the worksheet.

Best practices for dynamic array workflows

The clearest practice is building dynamic array formulas in empty areas of the worksheet. Pick a region with no other content, anchor your formula there, and let the spill output materialize without conflicts. This avoids SPILL errors entirely and makes the formula's spill range easy to see and reason about. For dashboard and report layouts, design with the dynamic array output size in mind from the start rather than retrofitting formulas into busy regions.

For shared workbooks where multiple users add content over time, document which cells contain dynamic array formulas and which ranges should be left empty for spill output. A simple convention โ€” "don't put anything in column F below the FILTER formula in F2" โ€” prevents accidental blocking by users who don't realize the spill range needs to remain empty for the formula to function. Cell comments or sheet-level documentation help communicate this constraint to other users editing the workbook in the future.

For formulas where the output size could grow large (FILTER on a long source list, UNIQUE on a wide-input range), constrain the output explicitly with TAKE or DROP. =TAKE(FILTER(data, criteria), 50) caps the output at 50 rows regardless of how many rows would otherwise match. The constrained output makes layout planning predictable and prevents SPILL errors that would arise if the unconstrained output grew into adjacent occupied cells over time as data accumulated in the source.

For workbooks where dynamic arrays don't fit cleanly with the existing layout, consider whether Power Query or PivotTables would handle the same analysis more gracefully. Both alternatives produce structured output in dedicated areas without the spill conflicts of dynamic array formulas. Power Query is especially powerful for transformation work that dynamic arrays could also handle but with more layout flexibility. Pivot tables handle aggregation and summary work that dynamic arrays could approximate but typically less elegantly than the dedicated pivot tool designed for that purpose.

Dynamic array formulas โ€” pros and cons

Pros

  • โ€”
  • โ€”
  • โ€”
  • โ€”
  • โ€”

Cons

  • โ€”
  • โ€”
  • โ€”
  • โ€”
  • โ€”
Take an Excel prep quiz

Excel Questions and Answers

What is the #SPILL! error in Excel?

The #SPILL! error appears in Excel 365 and Excel 2021 when a dynamic array formula tries to spill its output across multiple cells but something is blocking the spill range. Common causes include existing content in the cells where output would appear, merged cells in the target range, Excel Table boundary conflicts, or insufficient space at the edge of the worksheet. The error protects existing data from being overwritten silently.

How do I fix a SPILL error?

Click the cell with #SPILL! and look for the small green warning indicator. Click the dropdown and choose 'Select Obstructing Cells' โ€” Excel highlights the cells blocking the spill. Clear those cells with Delete and the spill resolves. For merged cells blocking the spill, unmerge them via Home โ†’ Merge & Center โ†’ Unmerge. For Excel Table conflicts, move the formula outside the Table or convert the Table to a regular range.

What functions produce SPILL errors?

Dynamic array functions including FILTER, SORT, SORTBY, UNIQUE, SEQUENCE, RANDARRAY, and XLOOKUP (when used in array mode). Older functions like SUMIF and VLOOKUP can also produce array output in some patterns. Any formula that returns multiple values into adjacent cells is a dynamic array formula and can produce SPILL when its output range is blocked. Single-value formulas don't produce SPILL because they only need one cell.

Why do older Excel versions not show SPILL errors?

Dynamic arrays were introduced in Microsoft 365 around 2020 and added to Excel 2021. Older versions (Excel 2019, 2016, 2013, etc.) don't have the dynamic array engine and don't produce SPILL errors. Files with dynamic array formulas opened in older Excel show #NAME! errors or produce single-cell results instead of arrays. For cross-version compatibility, use older array formulas (Ctrl+Shift+Enter) or traditional functions.

What does the @ symbol mean in Excel formulas?

The @ implicit intersection operator forces a formula to return a single value rather than spilling into an array. =@INDEX(A1:A10, B1) explicitly returns one value. The @ appears automatically when Excel converts older formulas to the dynamic array engine, preserving original single-value behavior. Most users don't add @ manually; Excel handles it during file conversions. The @ doesn't fix SPILL errors โ€” it's for opting out of dynamic array behavior in new formulas.

Can I use dynamic arrays in Excel Tables?

Not cleanly. Excel Tables have their own auto-resize behavior that conflicts with dynamic array spill ranges. Dynamic array formulas inside an Excel Table typically produce SPILL or other errors. The fix is either to move the formula outside the Table to a regular range, or convert the Table to a normal range via Table Tools โ†’ Design โ†’ Convert to Range. The Table-and-dynamic-array conflict is a known limitation of current Excel versions that may improve in future updates.
โ–ถ Start Quiz