Got my first crack at LAMBDA today. It's a very intriguing concept: a kind of shortcut to writing your own UDF in VBA, or an XLL addin, but with a few drawbacks currently.
Random initial thoughts:
- Be careful when naming variables : =LAMBDA(x,y,x+y)(1,2) works, but LAMBDA(x1,y1,x1+y1)(1,2) does not: I assume it is because Excel is (helpfully?) interpreting x1 as cell X1. Not a drama, as I used "x_1" instead (took me a while to twig!);
- You don't see any parameter names (or parameter help) in the Function Wizard, so you'd have to go back to the Name Manager if you have forgotten what the function does;
- Not sure how I could share a LAMBDA with someone else, or re-use it in another sheet without re-entering the Name. There is this tantalizing comment "Create libraries for any pieces of logic you plan to use multiple times", so perhaps there is a way.
Ideally, over time, one would build up a "library" of handy LAMBDAs, which one could share with colleagues. Eg =LAMBDA(x_1,y_1,x_2,y_2,x,y_1 + (x-x_1)*(y_2 - y_1) / (x_2 - x_1)), which does a simple linear interpolation between (x_1,y_1) and (x_2,y_2) for value x.
I guess that (like in say C++) lambdas are intended as short snippets of code, rather than extended algorithms, so maybe I am asking too much?