This is a game-changer level feature. I have been dreaming of this and more other power features for a long while. Well, except for the Name Manager part in their implementation, which seems to be a total disaster. I really hope this is a first version and they are going to keep improving it as they say. One should really define the functions in the cells and be able to reference them like =A1(2). The last thing a be…
Frankly Name Manager could also be way useful if they just generified it. Make it so that you can name a cell. Then,l you get named "variables" and, with your proposed lambda implementation, you get both named and anonymous functions in one. They are orthogonal features. As is, yes, Name Manager seems very ugly.
Lambda: Turn Excel formulas into custom functions
131–140 of 140 posts
Re: Lambda: Turn Excel formulas into custom functions
#132Earlier quoted context omitted.
Can you do LAMBDA(...)(x)? That would make it an anonymous function. Of course the real fun starts when you can do: =LAMBDA(f, LAMBDA(x, f(x(x)))(LAMBDA(x, f(x(x)))))
You can, but you can't (currently?) do =A1(x) where A1 is a LAMBDA function. I think LAMBDA(...)(x) is only useful for testing/development, but maybe I'm missing some good use cases.
Re: Lambda: Turn Excel formulas into custom functions
#133Wow this is cool! I felt that something like this could be transformative to excel for some time. 2014: https://news.ycombinator.com/item?id=8116224 > spreadsheets might be an interesting programming environment if you were restricted to the native functionality with a small addition. Namely, add a new value type: "anonymous function,"... 2019: https://news.ycombinator.com/item?id=21356824 > Excel needs exactly one t…
Totally agree, we even applied to YC 5 years ago with an excel replacement specifically because of this limitation.
Re: Lambda: Turn Excel formulas into custom functions
#134Earlier quoted context omitted.
Totally agree, we even applied to YC 5 years ago with an excel replacement specifically because of this limitation.
The danger here is that MS can just observe your success and add the feature once you've proved it works, and your nice little blue gulf instantly turns red again. Though I might be interested in a redesign of the formula language; excel's is kinda crusty.
Re: Lambda: Turn Excel formulas into custom functions
#135Earlier quoted context omitted.
They can also be referenced via the cells. You could argue that cells are themselves named, but those names are really indices into a 2D array, you can have relative references or do offset-based math if needed, and there's indirection (i.e. you can use an arbitrary value as an index to read/write another value). Given all this, an index of a cell containing a lambda is really a lot like a function reference, and can…
Huh, are you sure? I don’t think you can (currently) define a lambda in a cell without also calling it in that cell (which means the cell now evaluates to the function’s return value, not a function). The LAMBDA docs: “If you create a LAMBDA function in a cell without also calling it from within the cell, Excel returns a #CALC! error.” https://support.microsoft.com/en-us/office/lambda-function-b...
Re: Lambda: Turn Excel formulas into custom functions
#136Earlier quoted context omitted.
Huh, are you sure? I don’t think you can (currently) define a lambda in a cell without also calling it in that cell (which means the cell now evaluates to the function’s return value, not a function). The LAMBDA docs: “If you create a LAMBDA function in a cell without also calling it from within the cell, Excel returns a #CALC! error.” https://support.microsoft.com/en-us/office/lambda-function-b...
It will show #CALC! for that cell because, well, it has to show something for the result of the formula - but the formula didn't evaluate to a "displayable" value.
Specifically:
1) Put =LAMBDA(x, x+1) in A1
2) Try calling =A1(1) from any other cell - it will return #REF!
I'm on the Office Insiders beta track and LAMBDA does work otherwise.
Re: Lambda: Turn Excel formulas into custom functions
#137This is a game-changer level feature. I have been dreaming of this and more other power features for a long while. Well, except for the Name Manager part in their implementation, which seems to be a total disaster. I really hope this is a first version and they are going to keep improving it as they say. One should really define the functions in the cells and be able to reference them like =A1(2). The last thing a be…
Re: Lambda: Turn Excel formulas into custom functions
#138Wow this is cool! I felt that something like this could be transformative to excel for some time. 2014: https://news.ycombinator.com/item?id=8116224 > spreadsheets might be an interesting programming environment if you were restricted to the native functionality with a small addition. Namely, add a new value type: "anonymous function,"... 2019: https://news.ycombinator.com/item?id=21356824 > Excel needs exactly one t…
Totally agree, we even applied to YC 5 years ago with an excel replacement specifically because of this limitation.
Re: Lambda: Turn Excel formulas into custom functions
#139Earlier quoted context omitted.
The danger here is that MS can just observe your success and add the feature once you've proved it works, and your nice little blue gulf instantly turns red again. Though I might be interested in a redesign of the formula language; excel's is kinda crusty.
The idea had many downsides. But considering how little excel has changed in the 20 years I’ve used it, I wouldn’t be too worried about that particular issue!
Re: Lambda: Turn Excel formulas into custom functions
#140Earlier quoted context omitted.
Totally agree, we even applied to YC 5 years ago with an excel replacement specifically because of this limitation.
Actually what might be better is "sheet functions". So like pages where you can define input and output cells. Then you top level sheet can invoke the "function" as like "=myfunctionsheet{A1=5, A2=9}.N8". That way you get local scope, etc, and you can do more complex stuff because it's very visual instead of being a mathematical function.