Creating Eta LAMBDA Helpers
Before Eta reduced LAMBDAs, summing array columns was a challenge to most Excel users. That changed when Microsoft made BYCOL() an Eta reduced LAMBDA function.
(NOTE! I have edited this article to switch from "Eta Function" to "Eta Reduced LAMBDA." See Sergei Baklan's comment on why.)
What is an Eta reduce LAMBDA function?
An Eta reduced LAMBDA allows us to directly use common aggregation functions (like SUM, AVERAGE, etc.) within dynamic array functions, without needing to explicitly wrap them in a LAMBDA function. Thus, instead of writing:
=BYCOL( Array, LAMBDA( Value, SUM(Value))
We can just write:
=BYCOL( Array, SUM)
If our function takes an argument and passes it directly to another function, we can often simplify the expression by just referring to the inner function directly. It’s not only fewer keystrokes—it also removes the intimidation factor of the word "LAMBDA." But more importantly, Eta reduced LAMBDAs make our reusable logic more versatile, turning single-purpose functions into a multi-purpose one.
What kind of functions should we convert to Eta reduced LAMBDA functions?
An Eta reduced LAMBDA can consolidate several similar functions into just one. For example, prior to Eta reduced LAMBDAs, I created these functions:
RollingSumλ()
RollingAvgλ()
RollingMinλ()
RollingMaxλ().
Each applies a different aggregation over a sliding window of values. Here is an example of RollingAvgλ() (in green cell) averaging the values in a window that is four cells wide and does not allow partial windows.
These functions all shared the same four arguments:
Row - A row of values to 'roll' over
Size - The size of the rolling window.
Offset - The window's starting position (negative = cells to the left, positive = right).
AllowPartial - Whether partial windows are processed (TRUE) or return #N/A (FALSE).
Rather than maintain four nearly identical functions, I consolidated them into a single Eta-style function: Rollingλ().
=Rollingλ( Row, Size, Offset, TRUE, SUM)
Now, the same function can compute a rolling sum, average, min, or max—just by changing the fifth argument.
How do we convert functions to Eta reduced LAMBDA functions?
To convert these functions to a single Eta reduced LAMBDA, I
Isolated the rolling logic that returns the rolling window
Added a fifth argument: Function
Passed the window to that function.
Here’s a simplified version of the core logic:
Final Thought
Adding Eta compatibility makes our LAMBDA functions more accessible and more powerful. If your function ends by applying another function to a single argument, consider converting it to Eta form.
It’s a simple upgrade with big returns—for you and your users.
Freelance financial modeller, specialising in infrastructure and energy businesses
2moVery interesting, as always! What this technique achieves is changing a bunch of LAMBDA functions e.g. RollingSum, and instead boil it down to a single function *with an additional parameter*. There is a conversation we need to have as modellers about whether it is more user friendly for people to have fewer, more complicated (more parameters) LAMBDA functions, or more functions, but each having a more specific purpose and fewer parameters. My feeling is that regular users really struggle with extra parameters (e.g. see the match type parameter in MATCH), and they prefer to see the differences reflected in words i.e. in function names.
Director, General at JSC Arcadia Inc ; former Microsoft Excel MVP
2moI'd prefer to use "eta conversion" or "eta reduction". Dirichlet took the term "eta function" for his math long ago.
Ex-Big4 Consultant || Valuation, Modeling, Analytics || 60K+ Followers || MS Excel (Spreadsheet) Expert || Project Finance || Trainer & Cool Mentor || Belief - Drafted solutions ☑️ ; Problem Talker ❌
2moThe world is afraid AI will take away our jobs... Financial Modellers are worried Craig Hatmaker and 5G would take their jobs :)