Excel #CALC! from FILTER: add if_empty
An AI FILTER formula showing #CALC! usually means no rows matched and the result was empty. Add the if_empty argument; else check LAMBDA and nested arrays.
The =FILTER(A2:C20,C2:C20>100) an AI gave you spilled a table fine yesterday, and today it shows a single #CALC!. No row matched the condition, so FILTER tried to return an empty result; adding the third argument, if_empty, fixes it. Microsoft's docs explain that Excel does not support empty arrays, so this case returns #CALC!.
[1] First confirm that nothing really matches. In the example above, sort or filter C2:C20 to see whether any value is greater than 100. If matching values exist and you still get #CALC!, this is not your case; go to [4].
[2] Pass the value to show when nothing matches as the third argument.
=FILTER(A2:C20,C2:C20>100,"No matches")| Third argument | When nothing matches |
|---|---|
"No matches" | That text appears in one cell |
"" | Looks like an empty cell |
0 | Shows 0 (the docs' example) |
"" looks tidy, but on screen you can no longer tell "no results" from "no formula". In a sheet other people read, showing text is safer. If cells below reuse this result in calculations, make sure the 0 or text doesn't leak into them.
[3] When asking the AI again, make empty-result handling part of the request.
Give me a FILTER formula for Excel for Microsoft 365. Show only rows of A2:C20 where column C is greater than 100,and if no row matches, show "No matches" — be sure to use FILTER's third argument (if_empty). Don't wrap it in IFERROR.FILTER's help page lists Microsoft 365, Excel 2021, 2024 and others under "Applies To", with nothing from 2019 or earlier. If an older version gives #NAME?, see Excel #NAME? on an AI formula: function missing in your version.
[4] If it isn't FILTER and you still get #CALC!, check the other causes in Microsoft's docs.
| Cause | Example | Fix |
|---|---|---|
| LAMBDA defined but never called | =LAMBDA(x, x+1) | Call it with a value: =LAMBDA(x, x+1)(1) returns 2, or register it in Name Manager under a name such as AddOne and change the cell to call that name, like =AddOne(1) (registering alone doesn't fix the existing cell) |
| Result is a function itself | A function placed in a cell without being called | Add parentheses and arguments to call it |
| Array inside an array (nested array) | =MUNIT({1,2}) | Remove the second array: =MUNIT(2) |
| Array of ranges | =OFFSET(A1,0,0,{2,3}) | Drop the range reference: =OFFSET(A1,0,0,2,3) |
| Custom function in Excel for the web referring to more than 10,000 cells | Web only | Open the file in desktop Excel |
In a long formula with several functions nested together, the failing part isn't obvious. The docs suggest stepping through it with Evaluate Formula on the Formulas tab to find where #CALC! appears.
If the same dynamic array formula sits inside a table, or cells below are blocked, you get #SPILL! rather than #CALC!; see Diagnose an Excel #SPILL! error with AI.