Sub topic 3
The @ Operator and Legacy Array Formulas
Assume you know Excel formulas, cell references, and basic functions. This chapter focuses on Microsoft 365 or Excel 2021 and later.
The @ operator and legacy array formulas
The @ operator applies implicit intersection. It reduces a range to the value from the current row or column.
=@A2:A6In a dynamic-array workbook, =A2:A6 can spill five values. Adding @ returns one value instead. Excel may add @ automatically when it opens an older workbook to preserve its original behavior.
Before dynamic arrays, formulas that returned several values were called legacy array formulas. You entered them over a selected range and confirmed them with Ctrl+Shift+Enter. Excel displayed braces around them, such as {=A2:A6*B2:B6}. Do not type the braces. New formulas usually need only the anchor cell.
Combining functions and handling empty results
Array functions become powerful when nested. This formula removes duplicates, sorts them, and returns the first three results:
=TAKE(SORT(UNIQUE(A2:A20)),3)FILTER returns #CALC! when no rows match unless you provide an if_empty value:
=FILTER(A2:C20,C2:C20>100,"No matches")Some operations cannot return an empty array, so Excel displays #CALC!. Supply a fallback with FILTER, or test the input before performing the calculation.
Compatibility and limits
Dynamic arrays work in Microsoft 365 and Excel 2021 or later. Older Excel versions do not support automatic spilling or newer functions such as FILTER and TAKE. Tables, merged cells, and protected areas can also prevent a spill. Cross-workbook dynamic-array links may return #REF! when the source workbook is closed.
Shaping, readability, and other features
TAKE and DROP select rows or columns. VSTACK and HSTACK combine arrays vertically or horizontally.
=HSTACK(A2:A10,C2:C10)Use LET to name repeated calculations:
=LET(names,SORT(UNIQUE(A2:A20)),TAKE(names,3))A LAMBDA helper can package a repeated formula for reuse through the Name Manager.
You can use a spill reference such as =E2# in charts, conditional formatting, and data-validation lists. The referenced range grows or shrinks automatically.
Exercise
What does @ do in =@A2:A6?
Show answer
It applies implicit intersection and returns one value instead of allowing the range to spill.