Sub topic 8
The @ operator and legacy array formulas
This chapter assumes you can enter and edit formulas, know cell and range references, and have Excel for Microsoft 365 or Excel 2021 or later. You should also know that a formula can spill, as covered earlier in this tutorial.
Implicit intersection before dynamic arrays
Older Excel versions let a formula return only one value per cell. If a formula pointed at a range where a single value was expected, Excel quietly picked one cell from that range. This is called implicit intersection. It chose the cell in the same row (or column) as the formula.
Suppose you type =A2:A6 into cell C3 in an old version. Excel returns the value of A3, because A3 is in row 3. In a cell outside rows 2 to 6, such as C8, the result is #VALUE!.
Dynamic array Excel does not do this by default. =A2:A6 now spills all five values. The @ operator asks for the old behavior explicitly:
=@A2:A6In C3 this returns the value of A3 and does not spill.
Why @ appears in old workbooks
Excel adds @ for you when you open a workbook that was written in an older version. The formula could have used implicit intersection there, so Excel adds @ to keep the result the same. A formula such as =INDEX(A2:A10,B1) may be displayed as =@INDEX(A2:A10,B1) if the function could return a range or array.
You can usually delete the @ safely. Do this when you want the formula to spill, or when the formula can only return one value anyway. Leave it in if you need the old single-value result.
Excel does not add @ in front of functions that always return one value, such as SUM.
The @ in a table reference such as [@Price] is a different use. It means "this row" in a structured reference. It has nothing to do with spilling.
Legacy array formulas
Before dynamic arrays, a formula had to be confirmed with Ctrl+Shift+Enter to calculate over whole ranges. Excel showed these formulas in braces. They are called legacy array formulas, or CSE formulas.
{=SUM(B2:B6*C2:C6)}The braces are added by Excel. You cannot type them. In dynamic array Excel, the same formula works with a plain Enter:
=SUM(B2:B6*C2:C6)Legacy array formulas still work, and Excel keeps them as they are. They behave differently from spill formulas in three ways:
- A multi-cell legacy array formula fills a fixed block of cells. It does not resize when the data changes.
- You cannot edit or delete part of the block. Excel shows a message that you cannot change part of an array.
- The other cells in the block are not formulas you can edit. Only the whole block can be changed.
To convert one, select any cell in the block and look at the formula bar. Copy the formula and delete the whole block. Then paste the formula into the top-left cell and press Enter. It now spills and can be referenced with #.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| `#VALUE!` from `=@A2:A6` | The formula's row is outside rows 2 to 6 | Move the formula or remove `@` |
| "You can't change part of an array" | Editing one cell of a legacy array block | Select the whole block, or delete it and re-enter |
| Extra `@` in an opened file | Excel preserved old single-value behavior | Remove `@` if you want a spill |
Exercise
In cell D4, you type =@B2:B8. In D10, you type the same formula. What does each cell return?
Show answer
D4 returns the value of B4, because B4 is in the same row as the formula. D10 returns #VALUE!, because row 10 is outside rows 2 to 8, so there is no intersecting cell.
Exercise
A coworker's workbook has {=SUM(B2:B6*C2:C6)} in one cell. How do you turn it into a normal dynamic array formula?
Show answer
Select the cell, copy the formula without the braces, and delete it. Enter =SUM(B2:B6*C2:C6) in the same cell with plain Enter. Check that the result matches the old one.