Forum Discussion
PIVOTBY function: SUM turns into "_xleta.SUM"
Hi,
I am using a PIVOTBY function with "SUM" as function in excel web.
This table is shared online with colleagues and we wanted to get rid of manuallly updating the pivot tables.
Everytime the sheet is being reopend the pivotby function creates an error "#NAME"
I checked and it is because the "SUM" changes automatically into "_xleta.SUM".
When I correct the formuar the PIVOTBY function works again perfect.
Why does the formular keeps changing the function by itself and how to avoid it? Is it abug?
Best regards
3 Replies
- OlufemiOBrass Contributor
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 - OliverScheurichGold Contributor
You can use
LAMBDA(x,SUM(x))
in english Excel instead of only
SUM
I experience the same problem in Excel online if i use only SUMME or MITTELWERT or ZEILEN in german Excel.
The "_xleta." doesn't appear anymore if i use LAMBDA(x;SUMME(x)) or LAMBDA(x;MITTELWERT(x)) or LAMBDA(x;ZEILEN(x)).....
This means that if i apply SUMME or MITTELWERT or ZEILEN in german Excel "_xleta.SUM" or "_xleta.AVERAGE" or "_xleta.ROWS" (in english) is returned from time to time.
Unfortunately i don't know why this happens with SUM (SUMME) or AVERAGE (MITTELWERT) or ROWS (ZEILEN).....
In spanish Excel you can use LAMBDA(x;SUMA(x)), in french Excel LAMBDA(x;SOMME(x)), in hungarian Excel LAMBDA(x;SZUM(x)) ....
- fArn_25Copper Contributor
Thank you both for the quick reply, the "LAMBDA" solution works.
Maybe it'll be fixed by MS someday...
Best regards