Original article is much clearer. This is a long-needed and awaited step. I'd say this might be the most important change in Excel in years. The recursion hacks mean that all kinds of looping hacks can be removed.
I think the biggest improvement this will have is in keeping things tidy and facilitating reuse. Yes, recursion is nice, but I suspect that it's not going to see much use compared to just replacing repeated formulas with simple functions.
Of course this also means that Excel becomes even more of a slippery slope towards programming generally, which can only be a good thing.
A cell can contain any value. Values in Excel have always been:
- numbers
- text,
- cell references
- formulae that resolve to one of the above
Allowing a value to be a function would (presumably) allow a cell to contain a function (just the function, not an invocation of a function). I can't imagine that being a simple change, or one introduced without being explicitly in the docs.
Your list is missing "Rich Value Types" (like stocks or geographical locations). Those can be stored in a cell, and then have other cells access their fields with =FIELDVALUE(...). Indeed the complete list of cell data in the api is: boolean, double, empty, error, integer, richValue, string, unknown
Further not every valid excel value (in the sense that you can pass it as a function argument) can be a cell value. For example arrays. Arrays need to spill into multiple cells if they are a result. Similarly, to my knowledge cell references cannot be the result value of a cell, as they would get dereferenced to get their underlying value as part of evaluation. On the other hand they most certainly are something that can be passed to a function without getting dereferenced first.
The name manager allows naming certain values that cannot be a cell result (like arrays), which makes it seem more likely that lambdas are full fledged data types, that could be passed to other lambdas. If I had access to a beta copy of excel, it would be easy to find out by running:
=LET(doubleapply, LAMBDA(x, y, x(x(y))), plusthree, LAMBDA(x, x+3), doubleapply(plusthree,5))
If that works, great lambdas are clearly a new first class data type. If it does not work, then obviously they are some form of second class citizen.
"LAMBDA allows you to define your own custom functions using Excel’s formula language. Excel already allows you to define custom functions, but only by writing them in an entirely different language such as JavaScript. In contrast, LAMBDA allows you to define a custom function in Excel’s own formula language."
@dang the original source seems clearer:
Announcing LAMBDA: Turn Excel formulas into custom functions
https://techcommunity.microsoft.com/t5/excel-blog/announcing...
Original article is much clearer. This is a long-needed and awaited step. I'd say this might be the most important change in Excel in years. The recursion hacks mean that all kinds of looping hacks can be removed.
I think the biggest improvement this will have is in keeping things tidy and facilitating reuse. Yes, recursion is nice, but I suspect that it's not going to see much use compared to just replacing repeated formulas with simple functions.
Of course this also means that Excel becomes even more of a slippery slope towards programming generally, which can only be a good thing.
It’s not clear from the documentation [0] whether this also adds lambda values (i.e. enabling higher-order functions).
[0] https://support.microsoft.com/en-us/office/lambda-function-b...
A cell can contain any value. Values in Excel have always been:
- numbers
- text,
- cell references
- formulae that resolve to one of the above
Allowing a value to be a function would (presumably) allow a cell to contain a function (just the function, not an invocation of a function). I can't imagine that being a simple change, or one introduced without being explicitly in the docs.
Your list is missing "Rich Value Types" (like stocks or geographical locations). Those can be stored in a cell, and then have other cells access their fields with =FIELDVALUE(...). Indeed the complete list of cell data in the api is: boolean, double, empty, error, integer, richValue, string, unknown
Further not every valid excel value (in the sense that you can pass it as a function argument) can be a cell value. For example arrays. Arrays need to spill into multiple cells if they are a result. Similarly, to my knowledge cell references cannot be the result value of a cell, as they would get dereferenced to get their underlying value as part of evaluation. On the other hand they most certainly are something that can be passed to a function without getting dereferenced first.
The name manager allows naming certain values that cannot be a cell result (like arrays), which makes it seem more likely that lambdas are full fledged data types, that could be passed to other lambdas. If I had access to a beta copy of excel, it would be easy to find out by running:
If that works, great lambdas are clearly a new first class data type. If it does not work, then obviously they are some form of second class citizen.
"LAMBDA allows you to define your own custom functions using Excel’s formula language. Excel already allows you to define custom functions, but only by writing them in an entirely different language such as JavaScript. In contrast, LAMBDA allows you to define a custom function in Excel’s own formula language."