Forum Discussion
PIVOTBY function: SUM turns into "_xleta.SUM"
Hello fArn_25
You're absolutely right, this is a known issue in Excel for Web when using the PIVOTBY function with built-in aggregators like "SUM". What’s happening is that Excel sometimes rewrites "SUM" as an internal alias called _xleta.SUM, which isn’t reliably recognized across sessions or platforms. This leads to the #NAME? error when the workbook is reopened.
Why It Happens Excel uses internal “eta lambdas” to represent functions like SUM, AVERAGE, etc. In Excel Web, these can get rewritten as _xleta.SUM, _xleta.AVERAGE, etc. But these aliases aren’t stable — especially in shared workbooks or multilingual environments — so they break when reopened.
How to Fix It Instead of passing "SUM" directly, wrap it in a proper LAMBDA function:
=PIVOTBY(A2:A10, B2:B10, C2:C10, LAMBDA(x, SUM(x)))
This prevents Excel from rewriting the function and keeps it stable across platforms.
If you're using Excel in another language, use the localized function name inside the lambda:
- German: LAMBDA(x; SUMME(x))
- Spanish: LAMBDA(x; SUMA(x))
- French: LAMBDA(x; SOMME(x))
Bonus Tip: Named Lambdas You can define your own reusable aggregator using LET or Name Manager:
=LET( sumLambda, LAMBDA(array, REDUCE(0, array, LAMBDA(a, b, a + b))), sumLambda(B2:B10) )
This works in both Excel Web and Desktop — as long as you're using Microsoft 365 with support for dynamic arrays.
Hope this helps! You're not alone in running into this, and wrapping your aggregation logic in LAMBDA is the cleanest way to avoid _xleta errors and keep your formulas future-proof.
PIVOTBY
Best regards