Excel RECURSIVE Lambda - Create loops with ZERO coding!
Vložit
- čas přidán 24. 07. 2024
- Join 400,000+ professionals in our courses here 👉 link.xelplus.com/yt-d-all-cou...
The new Excel LAMBDA Function allows you to create your own CUSTOM FUNCTION without any coding. In this tutorial we'll take it to the next level and I'll show you how you can create a RECURSIVE Lambda in Excel. This is a function that's continuously looping through your data until it reaches a point of exit. What's the best way to write a recursive lambda?
⬇️ DOWNLOAD the workbook here: pages.xelplus.com/lambda-file
Writing Recursive Lambdas can be quite challenging because they are not easy to test or debug. Can you test it in the formula bar or do you have to type it directly in name manager? In this tutorial I'll teach you my approach on writing recursive lambdas from scratch.
Important: Excel Lambda function is available only in Excel for Microsoft 365.
Watch the first Excel Lambda video here: • Excel LAMBDA - HOW & W...
00:00 What a Recursive Lambda Function in Excel Can Do
02:02 How to Create a Recursive Lambda Function in Excel
09:12 Excel Lambda in Name Manager
10:32 Practical Example of Recursive Lambda in Excel
LINKS to more videos about Excel's new functions: • Excel for Office 365 &...
★ My Online Excel Courses ► www.xelplus.com/courses/
➡️ Join this channel to get access to perks: / @leilagharani
👕☕ Get the Official XelPlus MERCH: xelplus.creator-spring.com/
🎓 Not sure which of my Excel courses fits best for you? Take the quiz: www.xelplus.com/course-quiz/
🎥 RESOURCES I recommend: www.xelplus.com/resources/
🚩Let’s connect on social:
Instagram: / lgharani
LinkedIn: / xelplus
Note: This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!
#excel #lambda
Grab the file I used in the video from here 👉 pages.xelplus.com/lambda-file
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.
She's a genius. Someone give her the Nobel prize right now.
Agree
You know you are lost to humanity when you get excited for a new function on Excel 😂😂😂
You rock Leila !
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.
This is just so mind-blowing that I don't mind feeling a little nerd watching an Excel video on a weekend! 😂🤯
ME TOO!!
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!
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.
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 great with your excellent explanation, been waiting for this second part of Lambda.
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
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!
Finally the ability to add coding, looping logic without VBA. Very nice and well explained . As always.
I love your teaching style. Great job explaining such a complex concept!
Happy new year! and with your amazing videos the year in the office will be more than wonderful!
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!
It's really amazing! Thank you, Leyla, for sharing these super interesting news!
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!
You explained this PERFECTLY. You are the BEST!
Excellent data hygiene tool! Can't wait to watch your next tutorial on this function.
Brilliant. Couldn't stop saying this. I am really in love with these videos
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.
Amazing -- you explain this so clearly :) I am excited to try this out
I have been waiting for this! Very exciting!
Just great. Perfect explanation, no useless info, to the point!
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.
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!
Thanks a lot for this very helpful presentation. It's clear that LAMBDA is an other great improvement for an advanced Excel user. 💪
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!
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!
Great thinking from you, nice development.
I feel like going back to my programming classes right now 💐
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.
What a fantastic feature, and what a fantastic video. Thank you Leila!
Many thanks, Adrian!
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!!
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!
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.
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 :))
I remember this example from the Power Query List.Accumulate lecture! Great to see there is a new way to achieve this coming.
Very well explained Thank u Leila
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!
Amazing tutorial. Well done
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
Excellent as usual and very well explained. Thank you Leila.
You're very welcome!
A new level of Ms Excel! Thanks Leila!
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.
Best of your awesome videos so far that I've seen 👌
Wow, thanks!
so well explained! thank you!
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 :)
Thanks Leila for providing such a detailed explanation. I am sure you will come up with even more amazing examples of Lambda’s use. Have a great Xmas 😃
My pleasure 😊 Merry Xmas to you too!
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.
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!
Great videos, thank you
Amazing, thanks Leila!
Super. Thanks Leila ❤👍🌹
You are such a great teacher!!!
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.
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!
I think Excel is reaching its new heights in applications. Everyday it is providing something new.
True. Lots of great developments recently.
Love it! Love to problem solve so already imagining how to utilize it.
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!
Thank you! I have wanted a way to do this on many occasions.
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!
You are a brilliant tutor. Thanks
Wow. Great function and great explanation of new features
That's really a great development in Excel. Thanks for watching!
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.
Mind Blowing
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!
Thanks for teach and share with us !
Thanks Leila ...the way you explained Lambda function ... cleared alot of confusion for me
Happy to hear that, Hussein!
This is just awesome
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 😊
Very exciting! 10Q Leila!
Hello Leila, you are very intelligent, a very good teacher and the best: very beautiful!
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
Excellent presentation!
Thank you kindly, Eddie!
hi Leila, You've explained the Recursive Lambda amazingly!
Please make a separate video on MACHINE and explain what is call a machine.
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 😊
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
Thanks for this video.
Colours of 2021... Grey and yellow...you are updated and so are we...thanks
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!
impressive Many thanks Leila
Incredible example!!!!
That's really awesome!
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!
Amazing Explanation and very straight forward Leila, if you came up with this by yourself you're very smart :D
Awesome, super
Thank you
This is extraordinary! Thanks for the detailed explanation. bravo!
Glad you enjoyed it!
Excellent use case .. opens so many possibilities!!
Thanks for giving such wonderful knowledge
It's my pleasure
Leila: Beautiful example, thanks
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 like your all Excel course
Thank you very much for burning my brain in a good way all mighty Leila 🔥
You’re welcome 😊
Thank you Leila!
Thanks Leila really great explanation!
Glad you think so!
GENIUS!!
My god what you sharing is worth every penny..