The most powerful statement you made was right at the end. The next generation of excel users will be intuitively learning functional programing techniques. I suspect that this was perhaps the deeper reason behind Simon Peyton Jones decision to join Microsoft. Personally I am delighted as I know from experience that it takes time to become fluent with these techniques.
Absolutely agree. I was in the camp that VBA aged, and we should provide support for language such as Python/ R natively in Excel. But after seeing these recent paradigm shift in Excel programmability, I'll agree that I was short sighted. Any general-purpose programming language is a distraction for the population who uses Excel. I am a programmer, and still love Excel as it allows you to focus on the activity rather than how to do it. Lambda (and all the recent functions to support it) feel so tightly integrated. This is probably the best evolution in Excel, ever.
That’s interesting-SPJ has worked a lot on the same kinds of things-perhaps with more emphasis on formal methods intersecting with domain languages. He seemed to weigh in stuff like formal methods in secure operating systems, while still being hyper focused on thinking about language ecosystems like his comparisons about Java. Having just stopped running a company I am back in a job in finance, yet I still have a heavy addiction to programming. This is giving me exactly what I need to stay interested in what I’m doing. I’m seeing that there’s actually good structure here-and it is textbook ML style FP. However I still get bugged by the functions not being first class polymorphic functions where you can pass in labels with values dependent on higher order functions though. Example…I’m typing in a structured reference this morning like to a table called [APR] which is also a name of a table column like [@[APR]], and yet there are no operads for me to touch the concept of the string-it’s still objects. It’s still something that is not well defined in the sense of Grothendieck Universes, Agda, or even Haskell’s system F. Another example-I’m writing a Sumif with structured references and embedded conditional criteria-but it’s dax sometimes and it’s something else other times. I can’t know how the value will be represented in memory-will an embedded conditional be passed up to a Calling function, hit a type error I never see, or is it simply an undefined parameterization because the designers didn’t intend for users to make criteria into multi-function call chains? I’ve been in the lisp world a bit more than usual these past several months entertaining myself with nix and I can never imagine doing series fast paced corporate work with those-only building systems. And yet these don’t have the barriers that make it harder to express deep relationships about data and the many people oriented issues around that data. You’ve gotta write most stuff yourself, and outside of excel it’s not gonna be in some nice text editing space where the rules are standard. For example, no two emacs configs are alike. Just check out the many inconsistencies in packages between scala, OCaml, python, R, Rust, or Clojure, all kinda functional interfaces but not completely pure or well founded, and yet they still don’t really have great workspaces like an excel sheet or a power query editor. Kinda amazing.
Great explanation of this concept. Note that the name you give your parameters will appear in the function screen tips (the little pop-up that comes under your function when you are inside it). So if you name them "Text", "Before" and "After" instead of t, b and a, then it will be much easier for the user to figure out what to input in each parameter.
Do I know Excel? Not at all. People call me an Excel trainer but I think every time I watch an amazing video of yours it just makes me feel, super awesome. Thanks a lot for all the wonderful video content you keep posting.
Leila, watching your videos is like the quote: The MORE I know, the more I know How LESS I know.... Thank you for your efforts to make us understand this powerful function Lambda... Super Exited to start applying it for the tasks which were incomplete in past without looping functionality in Excel built-in functions
@@4verse79 VBA functions are notoriously slower than inbuilt excel functions. LAMBDA essentially allows you create custom inbuilt functions at the speed of the inbuilt functions.
Great!! Wrote a recursive lambda that can handle the whole string column array RPLAB(ar,a,b,i)=LAMBDA(ar,a,b,i,LET(r,ROWS(a),IF(i=r+1,ar,RPLAB(SUBSTITUTE(ar,INDEX(a,i),INDEX(b,i)),a,b,i+1)))) --replace a with b for array ar and i=1 If you don't like extra variable i we write another one REPLACEAB(ar,a,b)=LAMBDA(ar,a,b,RPLAB(ar,a,b,1)) Anyhow "i" can be very handy in case you want to start the search from a different index in the replace list.
Wow, I have puzzled over this for years. Thank you for explaining this. The function is like repeating mirrors that reflect off of the most recent reflection, but the difference is that in Excel you can program the way out for that latest reflection/replacement. This was very helpful!
Used Python for most of my data work but at my new job was forced to use Excel. Your tutorials have been a blessing. Really appreciate the work you put on these!
With BYROW and BYCOL this example can be done a lot easier, with the difference, that you will have to select the whole range of replacement words and not just the first cell. Thanks for the F2 tip in name manager that was super anoying until now.
Hey Leila, Big fan and have been watching you for years. I recently came across the magic of Map and Lambda in Google sheets / Excel and I would definitely would love to take it for a spin. I haven’t had the chance to use recursive lambda but one day, for sure.
Lambda functions are really powerfull. We, the developers, don't even know how much it will impact sheets creations from now on. I can already see people creating libraries full of personalized lambda functions to expand what Excel can do. I didn't really had time to do it, but I imagine that we finally can have fully optmizable neural networks or genetic algorithms working in Excel without any VBA or usage of Solver, just with lambda functions.
You make it look so easy, yet I’m sitting here thinking you’re using some form of magic. 🧐 What? How? 🤪 I love watching an artist at work. The ability to start with nothing and end up with something beautiful.🤩
I knew that Excel is very powerful but that powerful is shocker! Thanks Leila for teaching that other dimension of Excel so advanced and yet practical!
Great technique! This technique won't be clear to you if you dont understand loops in programming. With good understanding of loops, this Lambda technique would be clearer. Coding skill is becoming a must for the next gen of Excel power users really.
Another Thursday 'Must-Watch' date with Leila … but today's OMG moments required a pot of black coffee to watch both Lamdda videos three times … and I still have much work to do. For me, many of these functions are like getting a drink of water with a firehose … but the ideas … ideas … ideas are numerous!!! I leave hard copy post-it notes and digital post-it notes all over my financial models to remind myself to review again and incorporate Leila's lessons. Overwhelming … but so good … so well explained. As always … your are a treasure … thank you … thank you … thank you …
Trust me, it took me a long time and a lot of post-its to get the hang of it. But when it finally clicks it offers so many amazing possibilities. As always, thanks for your support!
Oh, Leila - this is an eye-opener! Thanks for sharing your knowledge. Actually I've got so many ideas to realize with LAMBDA, but recursive functions double the impact of this function. Can't wait to get the function at my insider-installation. Und ich hoffe auf 2021! Frohe Weihnachten und bleib gesund, Andreas.
This opens up Pandora's box, Now we have a tool to work on - try and try. Relate to our previous work, test where you can use it and create future intelligence. Thanks a Lot Lela
Brilliant, Brilliant, Brilliant. LAMDA stuffed with IF, SUBSTITUTE and OFFSET WoW !!. I think this function was invented by someone eating stuffed Turkey in a thanks giving dinner. Amazing decoding. What a function to close 2020 ! Cheers Leila !
Hi Leila. Awesome lesson and example! I love making VBA UDFs and it is kind of sad that VBA is at a dead end in terms of attention from Microsoft. But, these LAMBDAs look like fun and super powerful. Looking forward to testing them soon. Thanks for sharing :)) Thumbs up!!
Cristal clear! As always! Hmmm, I think I'm repetitive lately. I'm running out of appreciation adjectives for your pearls on Excel 😀😀😀 Leila, Bravo Zulu!
I have NO IDEA how you managed to pack so much into a video that length. I had a column of data where I need to strip out multiple extra words before and after the value I wanted to end up with. I tried it with a series of SUBSTITUTE commands, which worked, but required me to create a new column for each pattern to replace. Then I tried it again using your MegaReplace, and it worked like magic!
Wow. It's a Christimas gift before Christmas. I just activated the beta channel so I be able to use Lambda. It will save me a lot of time and make my workbook easier to understand.
Wow, i am blown by the power of this function. Excell is slowly stepping into coding territory my head is still spinning but I will get it. thank you Leila :)
Wow, Leila! This example is exceptionally cool in that it would allow you to add to your list of errors(b) and corrections(a) that it can fix without any change to your formula.
=LAMBDA(T, B, A, IF(B = "", T, MegaReplace( SUBSTITUTE(T, B, A), OFFSET(B, 1, 0), OFFSET(A, 1, 0) ) ) ) It seems that, at each iteration, the function is performing the following assignments: T = SUBSTITUTE(T, B, A) B = OFFSET(B, 1, 0) A = OFFSET(A, 1, 0) Therefore, it seems that the arguments of the inside function with the name of the LAMBDA function are the new values to assign to the parameters of the LAMBDA (T, B, A) in each iteration. The OFFSET function takes a reference and returns another reference. Thus, the last two assignments move the reference of a cell. Because the first assignment runs before the second and third, the first substitution uses the content of the cells given as arguments, before any shift by the OFFSET function. Because, after the last substitution, B and A are updated, B ends up located after the last row; therefore, in the next iteration, the exit condition (B = "") is TRUE. Please comment and correct the above!
A caution about the blank, "", as an escape from the recursive lambda is worth mentioning. Having a "" in a cell isn't (necessarily) the same as an empty cell; so be careful. There are cases Excel may interpret empty cell values differently than you expect as if there are hidden characters lurking around.
Hi Bob, I guess anyone of us is waiting for it. I've got three tenants and installations with different Insider installations, but no LAMBDA at all :-( Merry XMAS. Hope to see you next time in London or Amsterdam.
You have an excellent brain! This is very complicated, but you make it appear reasonable when you are explaining it. After you were done I realized that it is beyond me. However, it was wonderful and interesting just to listen to you.
Woaahhhhhhh!!!!..... You are simple awesome!!!.... I was using a approx. 100 line code in VBA to make this work...... Now this is simple superb, swift....
Extremely useful - thanks. As a sidenote, you had to use recursion to actually implement iteration - this goes to illustrate that every recursive algorithm has an equivalent iterative one, and vice versa.
History have been repeated again today! 😂 Yesterday i was watching this video, and today again i've helped to my colleague with this video. 🤗 Thanks a lot Leila!💃
So finally the Thursday Video on LAMBDA is here! Thank you Leila for the nice example and simple explanation! Now waiting for this to become common to all users from Microsoft, for using it practically in some of my data processing challenges! 😊👍
Hi Leila. Awesome! I developed recursive functions when programming in LISP years ago, with a twist in that the function was able to modify iteslf on the fly during recursions and do things that I couldn't figure out how to implement any other way. I have missed that power since moving on to other languages. Great to see this functionality in Excel!
It is better than using find and replace functions. Hopefully everyone can get to use it soon. Thanks for the long detail explaining of the use for this Lambda functions.
Hi Leila, Based on this I tried multi filter.. scenario is there are 5 filter criteria based on selection of filter criteria we need to either filter 1 r 3 r 5. We can use filter with + or* as filter criteria is dynamic..
For the functional programmers amongst us (and everyone else 😉) the question "is this realy recursion"? It is recursively programmed with a stop-condition, but it is not the function itself that calls itself over and over until the stop-condition is met. Anyway it is a great adition to Excel.
Very cool! I was intrigued about how lambdas would handle loops. This was an exceptional demonstration of skill 👍 I personally doubt the lambda function will go past anything but a curiosity in excel, but who am I to tell?! Would I ever want anybody to learn this? Heck no! Way too risky and again, only valid if inside a given workbook. Try asking anyone in the accounting department to audit Yves’ function now that I am sipping margaritas on an island!! Great outlier in the world of excel functions😊
Another great video and wonderful explanations. I still don't have this LAMBDA function but, thanks to you, I'll be ready for it. At last, I hope so. ;-) Oh, and I love it when you say "…here is how things can get complicated…". With Excel and people like you, life is never boring, there's always something to learn. So, a big thank you.
This is going to help in many more ways which is hard to perceive at this moment as the function is new and limited in examples. Look forward to more examples in its application.
I will be glad when this function is available on my Excel Insider version. Like you said a few months back, Microsoft has got better at delivering updates quicker, but there’s still room for improvement. Hopefully we won’t be waiting around for a year for it to be implemented in the main version.
Yep - it was definitely worth the wait since watching part 1! Thanks and liked the simple yet effective explanation on the term 'recursive', especially with the visual flow aid
Hi Leila - Big fan of your content, thanks! Apologies in advance, if someone else already made this suggestion. I think you should emphasize that the BEFORE/AFTER values should NOT be a table. While following along with the exercise, I made them both tables, which introduced an issue at runtime. SKILLS needs to be at table, but BEFORE/AFTER should not. I hope that explanation makes sense. Super cool function. Also, why is OFFSET volatile? I see a video on this function so I'll go check it out :)
Great video, good points, Super mega extrafragilistic cool!! Lambda, rocks, now, next challenge, a (kind of single cell) formula, with 2 array variables, the whole column and 2nd, the 2D array of replacements.😉😉✌✌
Good one. I also solved tried solving this substitute and offset but was not able to complete because I couldn't make out exit strategy. I couldn't thought of it. Well done.
WOW!!!! I have to play with this... working with large datasets with ‘incorrect’ nomenclature in 4 columns to standardize before pricing and importing - wow. I’m loving your vids, and will be signing up for your courses once my transition to corporate finalizes!
I’m going to be re-writing a lot of functions with this! I would be really helpful to have the pop up for the parameters when writing the function. Maybe, in addition to a comments section in name manager, there could be an option to add the parameters. Enjoying your videos!
This made me a bit sad..Back in the late 80s I was studying electronic engineering and I took a course in computer programming.. it was in PASCAL. (yes it was big then 🤣).. When we got to Recursive programing We got a home assignment to "solve" the solitaire "Towers of Hanoi" with ten rings.. The only clue we got was that "You solve the puzzle with ten rings the same way you do with nine..and then you add one ring" What makes me sad is that I could never get it and the thing that was lacking was in my own intelligence..We all have a point when we get of the train.. that was mine 🤣🤣🤣.. I always appreciate your videos and I'll use this to test my brains limitations 🤯
Great for simple stuff to mid stuff. But cannot replace vba for more complex things. For this example, VBA can call RegEx, which is far superior in complex string-matching. Still, liked it very much and I am soooo using it already thanks to her videos =3
@@LeilaGharani, this is true, and we have to acknowledge that there is hard work and, of course, deep knowledge behind these videos. And your courses are a good way to know Excel to work with; it is a good platform for learning, and your team is great.
Grab the file I used in the video from here 👉 pages.xelplus.com/lambda-file
She's a genius. Someone give her the Nobel prize right now.
Agree
The most powerful statement you made was right at the end. The next generation of excel users will be intuitively learning functional programing techniques. I suspect that this was perhaps the deeper reason behind Simon Peyton Jones decision to join Microsoft. Personally I am delighted as I know from experience that it takes time to become fluent with these techniques.
Absolutely agree. I was in the camp that VBA aged, and we should provide support for language such as Python/ R natively in Excel. But after seeing these recent paradigm shift in Excel programmability, I'll agree that I was short sighted.
Any general-purpose programming language is a distraction for the population who uses Excel. I am a programmer, and still love Excel as it allows you to focus on the activity rather than how to do it. Lambda (and all the recent functions to support it) feel so tightly integrated. This is probably the best evolution in Excel, ever.
That’s interesting-SPJ has worked a lot on the same kinds of things-perhaps with more emphasis on formal methods intersecting with domain languages. He seemed to weigh in stuff like formal methods in secure operating systems, while still being hyper focused on thinking about language ecosystems like his comparisons about Java.
Having just stopped running a company I am back in a job in finance, yet I still have a heavy addiction to programming. This is giving me exactly what I need to stay interested in what I’m doing. I’m seeing that there’s actually good structure here-and it is textbook ML style FP.
However I still get bugged by the functions not being first class polymorphic functions where you can pass in labels with values dependent on higher order functions though.
Example…I’m typing in a structured reference this morning like to a table called [APR] which is also a name of a table column like [@[APR]], and yet there are no operads for me to touch the concept of the string-it’s still objects. It’s still something that is not well defined in the sense of Grothendieck Universes, Agda, or even Haskell’s system F.
Another example-I’m writing a Sumif with structured references and embedded conditional criteria-but it’s dax sometimes and it’s something else other times. I can’t know how the value will be represented in memory-will an embedded conditional be passed up to a Calling function, hit a type error I never see, or is it simply an undefined parameterization because the designers didn’t intend for users to make criteria into multi-function call chains?
I’ve been in the lisp world a bit more than usual these past several months entertaining myself with nix and I can never imagine doing series fast paced corporate work with those-only building systems. And yet these don’t have the barriers that make it harder to express deep relationships about data and the many people oriented issues around that data. You’ve gotta write most stuff yourself, and outside of excel it’s not gonna be in some nice text editing space where the rules are standard.
For example, no two emacs configs are alike. Just check out the many inconsistencies in packages between scala, OCaml, python, R, Rust, or Clojure, all kinda functional interfaces but not completely pure or well founded, and yet they still don’t really have great workspaces like an excel sheet or a power query editor. Kinda amazing.
You know you are lost to humanity when you get excited for a new function on Excel 😂😂😂
You rock Leila !
Great explanation of this concept. Note that the name you give your parameters will appear in the function screen tips (the little pop-up that comes under your function when you are inside it). So if you name them "Text", "Before" and "After" instead of t, b and a, then it will be much easier for the user to figure out what to input in each parameter.
Do I know Excel? Not at all. People call me an Excel trainer but I think every time I watch an amazing video of yours it just makes me feel, super awesome. Thanks a lot for all the wonderful video content you keep posting.
WOW! I don't know what to say. I'm a bit overwhelmed but fascinated.
Welcome in my world ;-)
I come from a Python background and always wished there was a way to use loops in Excel without having to learn VBA. This video was my answer. Thanks!
Leila, watching your videos is like the quote:
The MORE I know, the more I know How LESS I know....
Thank you for your efforts to make us understand this powerful function Lambda...
Super Exited to start applying it for the tasks which were incomplete in past without looping functionality in Excel built-in functions
This is just so mind-blowing that I don't mind feeling a little nerd watching an Excel video on a weekend! 😂🤯
ME TOO!!
Same here friday and saturday night for me
The universe is expanding!
What's next - introducing for and while loops as functions in Excel maybe?! That will be awesome!
Or one could simply use VBA ...
@@4verse79 VBA gets complicated when a file needs to be stored on cloud or shared with different people.
@@4verse79 VBA functions are notoriously slower than inbuilt excel functions. LAMBDA essentially allows you create custom inbuilt functions at the speed of the inbuilt functions.
It exists in this video :)
if(t="",t, MegaReplace(...
AKA while t "" DO (function) t +=1 (or t = t + 1)
@@4verse79 a bit salty that the time it took to master vba will one day be rendered inefficient with these inbuilt functions
Great!! Wrote a recursive lambda that can handle the whole string column array
RPLAB(ar,a,b,i)=LAMBDA(ar,a,b,i,LET(r,ROWS(a),IF(i=r+1,ar,RPLAB(SUBSTITUTE(ar,INDEX(a,i),INDEX(b,i)),a,b,i+1))))
--replace a with b for array ar and i=1
If you don't like extra variable i we write another one REPLACEAB(ar,a,b)=LAMBDA(ar,a,b,RPLAB(ar,a,b,1))
Anyhow "i" can be very handy in case you want to start the search from a different index in the replace list.
This the best explanation of the recursive lambda I have seen thanks,
Indeed it is, she chose a good example and explained it clearly, without going too fast. Well done Leila!
Wow, I have puzzled over this for years. Thank you for explaining this. The function is like repeating mirrors that reflect off of the most recent reflection, but the difference is that in Excel you can program the way out for that latest reflection/replacement. This was very helpful!
Finally the ability to add coding, looping logic without VBA. Very nice and well explained . As always.
Used Python for most of my data work but at my new job was forced to use Excel. Your tutorials have been a blessing. Really appreciate the work you put on these!
Our pleasure, Daniel!
I think Excel is reaching its new heights in applications. Everyday it is providing something new.
True. Lots of great developments recently.
I love this! This is super interesting. It's like programming visual basic inside a cell without the actual vb language. Thanks for this video! :)
True 😁
My thoughts excactly.
This would be the most exciting video you've done! Crystal clear explanation of recursive use of the Lambda function. Brilliant, thank you.
Wow, thank you!
With BYROW and BYCOL this example can be done a lot easier, with the difference, that you will have to select the whole range of replacement words and not just the first cell.
Thanks for the F2 tip in name manager that was super anoying until now.
you are right! REDUCE might also help this to be leaner. (great video though :))
Hey Leila, Big fan and have been watching you for years. I recently came across the magic of Map and Lambda in Google sheets / Excel and I would definitely would love to take it for a spin. I haven’t had the chance to use recursive lambda but one day, for sure.
Sounds great!
Lambda functions are really powerfull. We, the developers, don't even know how much it will impact sheets creations from now on.
I can already see people creating libraries full of personalized lambda functions to expand what Excel can do.
I didn't really had time to do it, but I imagine that we finally can have fully optmizable neural networks or genetic algorithms working in Excel without any VBA or usage of Solver, just with lambda functions.
I had already thought of this implementation, but thanks for the confirmation that you believe that it can be done.
Sky is the limit 😊
You make it look so easy, yet I’m sitting here thinking you’re using some form of magic. 🧐 What? How? 🤪
I love watching an artist at work. The ability to start with nothing and end up with something beautiful.🤩
😊 thank you. It's definitely not the easiest topic 😁
I knew that Excel is very powerful but that powerful is shocker!
Thanks Leila for teaching that other dimension of Excel so advanced and yet practical!
Glad you enjoyed it!
This is just so great with your excellent explanation, been waiting for this second part of Lambda.
Great technique! This technique won't be clear to you if you dont understand loops in programming. With good understanding of loops, this Lambda technique would be clearer. Coding skill is becoming a must for the next gen of Excel power users really.
Another Thursday 'Must-Watch' date with Leila … but today's OMG moments required a pot of black coffee to watch both Lamdda videos three times … and I still have much work to do.
For me, many of these functions are like getting a drink of water with a firehose … but the ideas … ideas … ideas are numerous!!! I leave hard copy post-it notes and digital post-it notes all over my financial models to remind myself to review again and incorporate Leila's lessons. Overwhelming … but so good … so well explained.
As always … your are a treasure … thank you … thank you … thank you …
Trust me, it took me a long time and a lot of post-its to get the hang of it. But when it finally clicks it offers so many amazing possibilities. As always, thanks for your support!
Hello Leila, you are very intelligent, a very good teacher and the best: very beautiful!
Oh, Leila - this is an eye-opener! Thanks for sharing your knowledge. Actually I've got so many ideas to realize with LAMBDA, but recursive functions double the impact of this function. Can't wait to get the function at my insider-installation. Und ich hoffe auf 2021! Frohe Weihnachten und bleib gesund, Andreas.
It really is a great development. Auch dir Frohe Weihnachten und ein gutes Neues Jahr!
This is definitely advanced. I thought I was an advanced user, but I did not know Excel could do this.
For real, this can sound stupid, but only the F2 trick to move with arrows earned you my sub. Thanks for not skipping small details.
That's great! Welcome aboard.
This opens up Pandora's box, Now we have a tool to work on - try and try. Relate to our previous work, test where you can use it and create future intelligence. Thanks a Lot Lela
amazing to see that it is possible now to create lambda functions in excel and that no vba is required 😀. Big game changer! Great explanation, thanks!
Glad it was helpful!
Brilliant, Brilliant, Brilliant. LAMDA stuffed with IF, SUBSTITUTE and OFFSET WoW !!. I think this function was invented by someone eating stuffed Turkey in a thanks giving dinner. Amazing decoding. What a function to close 2020 ! Cheers Leila !
Haha, not sure about the stuffed turkey but it sure is an amazing development 😂
Hi Leila. Awesome lesson and example! I love making VBA UDFs and it is kind of sad that VBA is at a dead end in terms of attention from Microsoft. But, these LAMBDAs look like fun and super powerful. Looking forward to testing them soon. Thanks for sharing :)) Thumbs up!!
Just great. Perfect explanation, no useless info, to the point!
Thanks for this video. Many people do not even realize what a huge analytical tool Excel is.
You're very welcome! Absolutely.
Wow so now we are having not only a custom functions in Excel but also a custom recursive ones... Thanks a million Laila
You are welcome, Ibrahim 😊
Cristal clear! As always! Hmmm, I think I'm repetitive lately. I'm running out of appreciation adjectives for your pearls on Excel 😀😀😀
Leila, Bravo Zulu!
That's very kind. Repetition is always good 😁
I have NO IDEA how you managed to pack so much into a video that length. I had a column of data where I need to strip out multiple extra words before and after the value I wanted to end up with. I tried it with a series of SUBSTITUTE commands, which worked, but required me to create a new column for each pattern to replace. Then I tried it again using your MegaReplace, and it worked like magic!
Glad it was helpful, Anthony!
Wow. It's a Christimas gift before Christmas. I just activated the beta channel so I be able to use Lambda. It will save me a lot of time and make my workbook easier to understand.
Christmas came early for me too this year :)
Wow, i am blown by the power of this function. Excell is slowly stepping into coding territory my head is still spinning but I will get it. thank you Leila :)
My pleasure :)
I love your teaching style. Great job explaining such a complex concept!
Wow, Leila! This example is exceptionally cool in that it would allow you to add to your list of errors(b) and corrections(a) that it can fix without any change to your formula.
Thank you! Yes. It's great that it's dynamic and no need for refresh or updating formulas.
The Father of all Functions is out here.. Thanks Leila for such wonderful explanation!! 😊
You are so welcome!
=LAMBDA(T, B, A, IF(B = "", T, MegaReplace( SUBSTITUTE(T, B, A), OFFSET(B, 1, 0), OFFSET(A, 1, 0) ) ) )
It seems that, at each iteration, the function is performing the following assignments:
T = SUBSTITUTE(T, B, A)
B = OFFSET(B, 1, 0)
A = OFFSET(A, 1, 0)
Therefore, it seems that the arguments of the inside function with the name of the LAMBDA function are the new values to assign to the parameters of the LAMBDA (T, B, A) in each iteration.
The OFFSET function takes a reference and returns another reference. Thus, the last two assignments move the reference of a cell.
Because the first assignment runs before the second and third, the first substitution uses the content of the cells given as arguments, before any shift by the OFFSET function. Because, after the last substitution, B and A are updated, B ends up located after the last row; therefore, in the next iteration, the exit condition (B = "") is TRUE.
Please comment and correct the above!
A caution about the blank, "", as an escape from the recursive lambda is worth mentioning. Having a "" in a cell isn't (necessarily) the same as an empty cell; so be careful. There are cases Excel may interpret empty cell values differently than you expect as if there are hidden characters lurking around.
True, thanks for that tip!
Really well done, Leila! Can't wait until I have access to LAMBDA, even tho I have Microsoft 365 Insider!!
Hi Bob, I guess anyone of us is waiting for it. I've got three tenants and installations with different Insider installations, but no LAMBDA at all :-(
Merry XMAS. Hope to see you next time in London or Amsterdam.
@@at-excel I'm hosting the London event - GlobalExcelSummit.com (as well as leading one session)
Thanks Bob 😊. I had that issue with StockHistory. It took forever to show up in my beta version.
What a fantastic feature, and what a fantastic video. Thank you Leila!
Many thanks, Adrian!
You have an excellent brain! This is very complicated, but you make it appear reasonable when you are explaining it. After you were done I realized that it is beyond me. However, it was wonderful and interesting just to listen to you.
It definitely takes some time to get the hang of it.
With LET and LAMBDA Excel becomes microprogrammed. This is amazing.
It will take a while to get my head around this one but with your help I've started. You have become my goto for anything Excel...Thanks!!
Thank you, Robert!
Woaahhhhhhh!!!!..... You are simple awesome!!!.... I was using a approx. 100 line code in VBA to make this work...... Now this is simple superb, swift....
You're very welcome!
Extremely useful - thanks. As a sidenote, you had to use recursion to actually implement iteration - this goes to illustrate that every recursive algorithm has an equivalent iterative one, and vice versa.
History have been repeated again today! 😂
Yesterday i was watching this video, and today again i've helped to my colleague with this video. 🤗
Thanks a lot Leila!💃
Amazing! Great job!
So finally the Thursday Video on LAMBDA is here! Thank you Leila for the nice example and simple explanation! Now waiting for this to become common to all users from Microsoft, for using it practically in some of my data processing challenges! 😊👍
Thanks Vijay. Can't wait for this to become generally available.
Brilliant. Couldn't stop saying this. I am really in love with these videos
1 comment...always waiting for ur videos
She is one of the best, and her courses are pretty good; I'd say crucial if you want to know how to work with Excel in deep.
@@Galileo2pi yes.
Thank you so much 😀
Very Powerful, and Lambda is hard to understand, but you have made it a whole lot easier. Stating the obvious, You're really good.
Thank you, Justin!
You explained this PERFECTLY. You are the BEST!
Hi Leila. Awesome! I developed recursive functions when programming in LISP years ago, with a twist in that the function was able to modify iteslf on the fly during recursions and do things that I couldn't figure out how to implement any other way. I have missed that power since moving on to other languages. Great to see this functionality in Excel!
Now there's a programing language I haven't touched in a VERY long time!! LISP = Lost in Stupid Parenesis
My god what you sharing is worth every penny..
I remember this example from the Power Query List.Accumulate lecture! Great to see there is a new way to achieve this coming.
It is better than using find and replace functions. Hopefully everyone can get to use it soon. Thanks for the long detail explaining of the use for this Lambda functions.
You are welcome!
Hi Leila,
Based on this I tried multi filter.. scenario is there are 5 filter criteria based on selection of filter criteria we need to either filter 1 r 3 r 5. We can use filter with + or* as filter criteria is dynamic..
For the functional programmers amongst us (and everyone else 😉) the question "is this realy recursion"? It is recursively programmed with a stop-condition, but it is not the function itself that calls itself over and over until the stop-condition is met.
Anyway it is a great adition to Excel.
You r Super Awesome in Xcel Leila.... You have taken my Excel knowledge to an entirely new level... Thanks for ur great work.. Keep going....
Glad to hear that
Very cool! I was intrigued about how lambdas would handle loops. This was an exceptional demonstration of skill 👍 I personally doubt the lambda function will go past anything but a curiosity in excel, but who am I to tell?! Would I ever want anybody to learn this? Heck no! Way too risky and again, only valid if inside a given workbook. Try asking anyone in the accounting department to audit Yves’ function now that I am sipping margaritas on an island!! Great outlier in the world of excel functions😊
Best of your awesome videos so far that I've seen 👌
Wow, thanks!
Colours of 2021... Grey and yellow...you are updated and so are we...thanks
Another great video and wonderful explanations. I still don't have this LAMBDA function but, thanks to you, I'll be ready for it. At last, I hope so. ;-) Oh, and I love it when you say "…here is how things can get complicated…". With Excel and people like you, life is never boring, there's always something to learn. So, a big thank you.
Thank you, Claire!
This is going to help in many more ways which is hard to perceive at this moment as the function is new and limited in examples. Look forward to more examples in its application.
hi Leila, You've explained the Recursive Lambda amazingly!
Please make a separate video on MACHINE and explain what is call a machine.
Thanks Leila ...the way you explained Lambda function ... cleared alot of confusion for me
Happy to hear that, Hussein!
A new level of Ms Excel! Thanks Leila!
You're very welcome!
Thanks a lot for this very helpful presentation. It's clear that LAMBDA is an other great improvement for an advanced Excel user. 💪
I will be glad when this function is available on my Excel Insider version. Like you said a few months back, Microsoft has got better at delivering updates quicker, but there’s still room for improvement. Hopefully we won’t be waiting around for a year for it to be implemented in the main version.
I hope so too. Let me know once you get it!
Yep - it was definitely worth the wait since watching part 1! Thanks and liked the simple yet effective explanation on the term 'recursive', especially with the visual flow aid
Great to hear!
It's really amazing! Thank you, Leyla, for sharing these super interesting news!
9:35 wow I gave a like to the video for this tip alone. I've struggled so much trying to use arrow keys in that window!
impressive Many thanks Leila
Head's spinning....,
But a great video presentation.
Very useful function.
Thanks Leila.
Glad you enjoyed it!
Hi Leila - Big fan of your content, thanks! Apologies in advance, if someone else already made this suggestion. I think you should emphasize that the BEFORE/AFTER values should NOT be a table. While following along with the exercise, I made them both tables, which introduced an issue at runtime. SKILLS needs to be at table, but BEFORE/AFTER should not. I hope that explanation makes sense. Super cool function.
Also, why is OFFSET volatile? I see a video on this function so I'll go check it out :)
Running out of superlatives to compliment your videos 🙏👍
Thank you! Cheers!
I have been waiting for this! Very exciting!
Great video, good points, Super mega extrafragilistic cool!! Lambda, rocks, now, next challenge, a (kind of single cell) formula, with 2 array variables, the whole column and 2nd, the 2D array of replacements.😉😉✌✌
Happy new year! and with your amazing videos the year in the office will be more than wonderful!
Excellent data hygiene tool! Can't wait to watch your next tutorial on this function.
Good one. I also solved tried solving this substitute and offset but was not able to complete because I couldn't make out exit strategy. I couldn't thought of it.
Well done.
I like your all Excel course
Very well explained Leila. It's never easy to find a recursive example but this one rocks 👍
Thank you! 😃
Bye bye VBA you served us well ❤, great video as always Leila 🙌🏿
WOW!!!! I have to play with this... working with large datasets with ‘incorrect’ nomenclature in 4 columns to standardize before pricing and importing - wow. I’m loving your vids, and will be signing up for your courses once my transition to corporate finalizes!
Glad it was helpful, Josh!
I’m going to be re-writing a lot of functions with this! I would be really helpful to have the pop up for the parameters when writing the function. Maybe, in addition to a comments section in name manager, there could be an option to add the parameters. Enjoying your videos!
OMG, that's great
I need to see it again and again, thank you Leila for teaching me a lot of things about Excel
You're very welcome!
This made me a bit sad..Back in the late 80s I was studying electronic engineering and I took a course in computer programming.. it was in PASCAL. (yes it was big then 🤣).. When we got to Recursive programing We got a home assignment to "solve" the solitaire "Towers of Hanoi" with ten rings.. The only clue we got was that "You solve the puzzle with ten rings the same way you do with nine..and then you add one ring" What makes me sad is that I could never get it and the thing that was lacking was in my own intelligence..We all have a point when we get of the train.. that was mine 🤣🤣🤣.. I always appreciate your videos and I'll use this to test my brains limitations 🤯
Wow! This sounds like Sub() & Dim statements!
Also, iterative While statements.
Great for simple stuff to mid stuff. But cannot replace vba for more complex things. For this example, VBA can call RegEx, which is far superior in complex string-matching. Still, liked it very much and I am soooo using it already thanks to her videos =3
Super. Thanks Leila ❤👍🌹
Wow. Great function and great explanation of new features
That's really a great development in Excel. Thanks for watching!
As always, great, you're one of the best on this matter, terrific. Thanks
Wow, thank you!
@@LeilaGharani, this is true, and we have to acknowledge that there is hard work and, of course, deep knowledge behind these videos. And your courses are a good way to know Excel to work with; it is a good platform for learning, and your team is great.