Excel LAMBDA Recursion + a Trick for Evaluating in a Cell

  Рет қаралды 24,377

MyOnlineTrainingHub

MyOnlineTrainingHub

Күн бұрын

Пікірлер: 80
@guranslifes
@guranslifes Жыл бұрын
you are the best 'teacher', Mynda, out of all MVPs
@MyOnlineTrainingHub
@MyOnlineTrainingHub Жыл бұрын
Aw, you're too kind! Thank you so much 🥰
@rudiklein
@rudiklein 3 жыл бұрын
🤯 I shouldn't be watching these kind of videos before going to sleep.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
:-) at least it didn't put you to sleep!
@IvanCortinas_ES
@IvanCortinas_ES 3 жыл бұрын
Thank you for this tutorial Mynda. I am already waiting this function in my Excel 365. That's a very powerful function!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
You're welcome, Ivan!
@patrickschardt7724
@patrickschardt7724 3 жыл бұрын
Keeping track of the exit strategy and testing recursion are very hard. Great stuff
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Indeed, Patrick!
@sunnybaggu785
@sunnybaggu785 2 жыл бұрын
Your explanations, presentation and instructions are very good and interesting. Thank you for sharing excel tips this way. IAM sure many people like get to learn from your videos. Thank you..
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 жыл бұрын
So nice of you to say so, Sunny! Thank you.
@sunnybaggu785
@sunnybaggu785 2 жыл бұрын
@@MyOnlineTrainingHub thank you madam, apart from youtube, we try to follow and get updates from your email subscription and LinkedIn too.
@kltzy
@kltzy Жыл бұрын
Wasn't familiar with the ME functionality. Thanks Mynda, a good push in the right direction.
@MyOnlineTrainingHub
@MyOnlineTrainingHub Жыл бұрын
Happy to help!
@darrylmorgan
@darrylmorgan 3 жыл бұрын
Hi Mynda!Great Tutorial.Very Interesting Plus Nice And Easy To Understand...Thank You :)
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Glad you liked it, Darryl!
@samaruti9446
@samaruti9446 Жыл бұрын
Mynda, you have a great way of taking something complex and making it simple to understand, Can you please do the same with the ME parameter?
@MyOnlineTrainingHub
@MyOnlineTrainingHub Жыл бұрын
Thanks for your kind words! I know what you mean about the ME parameter. I'll add it to the list 😁
@gheorghebidiac2975
@gheorghebidiac2975 3 жыл бұрын
As you said: "mind bending"! :D
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
:-D
@DougHExcel
@DougHExcel 3 жыл бұрын
Great example! LAMBA could replace some VBA scripting so it's good to know
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Absolutely!
@chrism9037
@chrism9037 3 жыл бұрын
Wow. Time for an Advil, Mynda!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
:-) I know!
@mohammedahmed8295
@mohammedahmed8295 3 жыл бұрын
Appreciate your efforts
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
It's my pleasure, Mohammed!
@ItzAsgharHussain
@ItzAsgharHussain 3 жыл бұрын
Hi, in my excel workbook I have 200+ sheets & sheet names defined. Every sheet contains data like student name father name address and mob no.s if I enter sheet name I should get all the data in that particular sheet
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Unfortunately, the structure of the file goes against best practice, so any way you approach this will be a workaround. I recommend you use Power Query (kzbin.info/www/bejne/gmWlpoiwmMh_ptE) to consolidate the data into the correct tabular format: www.myonlinetraininghub.com/excel-tabular-data-format
@ItzAsgharHussain
@ItzAsgharHussain 3 жыл бұрын
​@@MyOnlineTrainingHub Thanks for reply, I've seen the video and your website, I have my data in one workbook and in that I have 200+ sheets (tabs). The data is well defined and in good format. All I want is, in the index sheet (tab), if I enter the sheet(tab) name I should get the data present in that particular sheet(tab). Just like vlookup. I watched all your vlookup videos and liked it, In vlookup the lookup value is a cell, I get one cell data from different sheet, here the lookup value should be sheet name & I want all cells data or multiple cell data from different sheet by entering sheet name.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
I understand what you want, but formulas are not suitable. You should fix the data layout and then you can use Slicers to filter the data to show what you want.
@ItzAsgharHussain
@ItzAsgharHussain 3 жыл бұрын
@@MyOnlineTrainingHub Ok mam understood, thanks a lot
@abdelkrimmesaiahmed662
@abdelkrimmesaiahmed662 3 жыл бұрын
Thank you for this amazing video
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Thank you!
@ricos1497
@ricos1497 3 жыл бұрын
Nice, I like the use of ME, I might try that. The bit I struggle with is how to bail on complex recursive functions, maybe where you've added a counter or whatever. Even in your example, it's not completely obvious how returning 1 in the IF() statement actually causes the function to return 120 (and not 1). That's the bit I struggle with when writing out recursion with more than one parameter, and when let gets involved and so on. I've actually written a couple where I added in another cntr variable, and a text variable that passed back the "state" of variables in the LET function and the counter, so I could effectively see which loop the thing broke on!
@Excelambda
@Excelambda 3 жыл бұрын
Haha, you are everywhere. Is very simple to understand how recursive works, (why is 120 and not 1), because only after finds the base case, the 1, has all the terms to conclude the calculation . for example fact(4) computer > 4 * fact(3) > 4*3*fact(2) > 4*3*2*fact(1) >condition met fact(1) =1 > 4*3*2*1 bam result 24 That's the idea of recursive, never leaves the calculation , continues because it calls itself but finishes only when it has all the terms known.
@ricos1497
@ricos1497 3 жыл бұрын
@@Excelambda Yes, that's a great way of explaining it! When I said it wasn't completely obvious, I meant to the layperson. It's a concept that doesn't exist elsewhere in Excel, and doesn't quite explain itself, so if you're looking at a recursive function, it's difficult to get by just looking at it. I'll steal your explanation for when I have to explain it to others!
@antonyroussel
@antonyroussel Ай бұрын
Hi! I've been trying to find ways NOT to use VBA, but I haven't been able to find a way to trigger an action (whatever that might be - just say calculate a formula in a cell), based on user interaction without it. Is there a way to perform an action if a user clicks on some kind of button or link etc, without using VBA?
@MyOnlineTrainingHub
@MyOnlineTrainingHub Ай бұрын
You can try using Office Scripts which is just another programming language, but scrips are executable on the web.
@realpulsecoin
@realpulsecoin 3 жыл бұрын
Great content!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Thanks, Rasmus!
@sktneer
@sktneer 2 жыл бұрын
Another way to do this is as below... Assuming the number is in A2, then to find the factorial of the number in A2, we may use the following formula directly in the cell. In B2 =REDUCE(1,SEQUENCE(A2),LAMBDA(n,r,n*r))
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 жыл бұрын
Thanks for sharing!
@sktneer
@sktneer 2 жыл бұрын
@@MyOnlineTrainingHub You're welcome, Mynda!
@johannes3020
@johannes3020 3 жыл бұрын
Hello, I have a problem: I'm trying to make a stock price chart show the points at which I've purchased the stock. Would you know how to do this? My attempts fail since the dynamic arrays conflict with each other. Thanks if you'll devote some time to helping.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Hi Johannes, please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@abdelkrimmesaiahmed662
@abdelkrimmesaiahmed662 3 жыл бұрын
Mynda there is no link to download the excel file
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Sorry! It's there now.
@abdelkrimmesaiahmed662
@abdelkrimmesaiahmed662 3 жыл бұрын
Thanks a lot
@TheEXCELGURU
@TheEXCELGURU 3 жыл бұрын
Hi there, i don't see the download link
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
So sorry! It's there now!
@drsteele4749
@drsteele4749 3 жыл бұрын
Does the fact you're using LAMBDA cause your cursor to jump down one cell after every entry, forcing you to move it up every time?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
No, the lambda doesn't affect the cursor.
@ZaneRinke
@ZaneRinke 8 ай бұрын
Mynda, Help! Surely one can use Lambda and it's recursive nature to create a Goal-Seek function. All searches fall short.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 8 ай бұрын
I imagine so, but I don't have any tutorials I can point you to and I suspect Goal Seek is more efficient.
@ZaneRinke
@ZaneRinke 8 ай бұрын
Thank you for responding. Normally, I would use goal seek, but here we are talking about hundreds of lines, with changing variables. I was hoping for a formula based solution.
@aquetongmedia
@aquetongmedia 2 ай бұрын
@@ZaneRinke did you ever find this?
@GeertDelmulle
@GeertDelmulle 3 жыл бұрын
That ME parameter must be something special, because defining recursive LAMBDAs as a local variable in LET normally doesn't work in my experience. Good to know. Thanks.
@GeertDelmulle
@GeertDelmulle 3 жыл бұрын
Hey Mynda, Here's a little challenge for you: another famous example for recursion (ever since the Middle Ages) are the Fibonacci numbers: F(n)=F(n-1)+F(n-2). It leads to the concept of the Golden Ratio. Can you show us how to create a recursive LAMBDA for this and calculate, for instance, Fibonacci(55)? While you're at it, maybe you want to do this both in Excel using a recursive LAMBDA and in Power Query as well, since you know so well how to calculate recursive things in the most efficient way in PQ-M... Are you up for the challenge?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Hi Geert! Fellow MVP Liam Bastick has written about using LAMBDA for Fibonacci here: www.sumproduct.com/news/article/lambda-formulaic-recursion-its-all-about-me
@GeertDelmulle
@GeertDelmulle 3 жыл бұрын
@@MyOnlineTrainingHub Ah! you're so lazy! LOL! :-) Just kidding. Yes, he got it right and linearized the calculation (the default 'trap'-implementation actually has a Fibonacci series for the calculation time itself, so you do not want to use that.) BTW: you don't need a double IF, so his formula can be simplified further, ever so slightly. FYI, you can check out the Mr.Excel Message Board in the LAMBDA section for other implementations (we didn't use the ME function there).
@romulusmilea2747
@romulusmilea2747 2 жыл бұрын
One question about 3:30 moment: then name was defined, you did not put the = sign before that IF, on the Refer to field. Excel users who used/created named formulas in the past, or even simple names did use = sign. Why this detail was not explained ? I have observed that many Excel experts on KZbin are in competition with each other, who can explain faster, and faster, details do not matter, the ultimate goal is to be as quick as possible. This is not teaching, it is just speeding. However, you do not seem to be one of them, but still I do not understand why explanation about that = sign is missing (surprisingly, on 5:21 the equal sign was used). Thank you.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 жыл бұрын
Hi Romulus, the formula does include the equals sign, it's just that the formula is long and you're only seeing the second line in the name manager. If you notice the formula I copy from the cell at 3:18 includes the equals sign.
@JoseAntonioMorato
@JoseAntonioMorato 3 жыл бұрын
I really liked the explanation of the possibility of testing the recursive LAMBDA using the LET function 👍, but this is not very simple to use. 🤔 I inform you that the download file link was missing. 😊
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Thanks, Jose. Not much about LAMBDA is easy. It's an advanced technique, but hopefully you can adapt the examples to your own formulas. I've added the link now. Sorry about that.
@JoseAntonioMorato
@JoseAntonioMorato 3 жыл бұрын
@@MyOnlineTrainingHub It is an advanced technique, but with the help of videos like yours, little by little we will be able to understand. Thankful. 🤗
@George-lp3qb
@George-lp3qb 2 жыл бұрын
Also they need to come up with a solution for the argument IntelliSense, otherwise, in my opinion, VBA UDF is still better especially that it is application level
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 жыл бұрын
They're working on it 😊
@micheleradogna4921
@micheleradogna4921 3 жыл бұрын
Can i use factorial for obtain a list? For example, if i want a list with all the number, between 5 and 1(4,3,2,1). Once for a Row. *5* 4 3 2 1
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
Hi Michele, you can use the SEQUENCE function for this: www.myonlinetraininghub.com/excel-sequence-function
@RR-fv2uu
@RR-fv2uu 3 жыл бұрын
can u help me
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 жыл бұрын
You can post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@beegdigit9811
@beegdigit9811 2 жыл бұрын
Excel has become a functional programming language lol
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 жыл бұрын
😁 yep!
Excel WORKDAY Function Trick to List Dates that Most People Don't Know
6:02
MyOnlineTrainingHub
Рет қаралды 21 М.
Excel LAMBDA - HOW & WHEN you Should use it
16:02
Leila Gharani
Рет қаралды 458 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
The Excel Tool That Does What PivotTables Can’t (File Included)
13:59
MyOnlineTrainingHub
Рет қаралды 254 М.
Excel Lambda Function (Examples) - All You Need to Know!
31:10
TrumpExcel
Рет қаралды 14 М.
How to easily automate boring Excel tasks with Power Query!
17:10
MyOnlineTrainingHub
Рет қаралды 1,6 МЛН
Write Excel formulas like a programmer
18:15
Diarmuid Early
Рет қаралды 8 М.
7 Advanced PivotTable Techniques That Feel Like Cheating
16:07
MyOnlineTrainingHub
Рет қаралды 108 М.
Excel LAMBDA() Function - What is it and when to use it?
13:07
When You Should Use the New Excel LET Function
17:18
Leila Gharani
Рет қаралды 777 М.