21:02
2025-04-02 15:35:53
Visit the Visual Basic for Applications (VBA) for Analysts course recordings page
WEBVTT--> How can I interact with your machine? --> Well, okay, you're going to subtract yes, --> start now, but yeah, --> so you need to use parentheses. --> No, no, no, no, no, the column is number five, one, two, three, four, --> no, the column is number six, and you need to be two, --> so the start now is number five, --> so you need to start now with minus one, right? --> Yeah, like if the column plus one equals six and I need to get two, --> yeah, so it's five, three, --> minus one, look this, look this, I'm going to, --> we have DIC your machine, --> we have five here, five, six, --> seven, and in the six, --> I have five, six, seven, okay? --> Something like that. Okay. --> You wrote number five as a start number, right? --> We need that this number moves to this column, right? --> Yeah. --> So we need one, two, three, four. --> You have four here, and this four is just the number you wrote, minus one, --> so this is what we need, --> the number you wrote, minus one. --> But instead of minus one, --> but there's still the plus one here. --> No, the plus one is another thing. --> You need, you need, no my code, baby. --> No my code. --> Yeah, but I just don't know why, --> why I need to start with minus one, minus one, all my names. --> If you, if we need, if you need, --> I'm going to do this, okay? --> Do you want, do you want to do this and this? --> Remember, remember this is a, --> remember this, this is what we have before we use input, okay? --> Oh, you have a new folder. --> Look, look, look my, look my, my screen, please, look my screen. --> Yeah. --> This is what we had before we use input box, remember? --> Yeah. --> This is before, so if we will use, --> if we use this without input box, it works, works as, as we want. --> But, but when we start using input box, --> the start number move the columns. --> What numbers of columns move? --> Move this. --> If I write a number, number five, --> moves four columns. --> If I write six, it moves five columns and so on, right? --> Is it okay or not, or not? --> Let me do it again. --> Let me do it again. --> I'm going to give you all of this. --> This is the first example, right? --> It's not, they're going to do it again. --> This is the first example, okay? --> Now, if I write that goes from one to 12, --> we use this to start in the second place, okay? --> Okay. --> Look this, I'm going to change this number one for five, okay? --> Number one for five. --> Just in the row columns, sorry, in the row here, okay? --> Look this, okay? --> So, let's go into two cities. --> We have one, two, three, four. --> How many spaces do we have? --> Four, right? --> I change it by five and we have four spaces. --> I'm going to change it for several. --> We have one, two, three, four, five, six. --> Okay, so if I change this number, it moves minus one. --> If I write ten, the number of spaces is going to be nine. --> If I write eleven, the space will be ten. --> See it again? --> Okay. --> So, if I need to these values start here, --> I'm going to need to do this. --> This number, seven, minus, or less one. --> Okay. --> I need to subtract this number. --> I'm going to do it again. --> Okay. --> If this is eight, I need to change this for eight. --> And now we will start. --> Yes, that's what I don't understand. --> So, in the formula, zero row plus one, minus eight, minus one. --> No. --> Look, you're going to see my formula. --> You're going to see my formula. --> The difference in my formula is that this plus one is here. --> It's just a difference. --> Look my formula. --> I can change it here. --> And it's the same. --> Yeah. --> Minus one, right? --> We need to do this. --> Okay. --> But remember that call goes from here to here. --> It's a variable, this one. --> It's not a static. --> Static is this number. --> This is a static. --> This is a variable. --> It's changed. --> Remember we're in a loop. --> The first number of call is a star number. --> For example, five. --> Five. --> The next six, seven. --> So, it's going to change. --> This is not. --> This is fixable. --> You don't understand, right? --> No, no. --> You don't understand me very well. --> I don't understand very well, but I can't allow you to do things like that. --> Okay. --> Well, I will think in a better way to explain you. --> Not now. --> I think for tomorrow, the first time. --> That is, well, let me think to explain it in a better way. --> Okay. --> But now, in this moment, I need to know that you understand how to use loops. --> It's the first of all. --> Do you know how to use for, how to use do while, how to use do until, right? --> Yes, but I think with all of that, I need to practice, right? --> Yes, I know. --> We're going to practice tomorrow. --> We're going to take at least two hours to practice this. --> Okay. --> To improve our skills. --> Okay? --> Don't worry. --> Yeah. --> Don't worry. --> I will prepare very similar examples with this. --> Right? --> So, the other way that I need that you understand is how to use input loops. --> And I think you got it, right? --> Yeah, that's what I know. --> Yeah. --> Okay. --> So, let's going to make a very simple example. --> Okay? --> You're going to do this. --> I need that you use an input box to answer for the age of a person. --> Okay? --> And I need you to display a message with the mother age that has 20 more years. --> For example, if I write that I have 20 years, it's going to display a message that my --> mother has 40 years. --> Okay? --> Okay. --> Okay. --> Okay. --> Great. --> That is great. --> Okay. --> So, you can use a very well input box and message box and use very well the variables. --> That's very, very good. --> Okay? --> And we have to make now an example. --> What about if I wrote my birthday? --> Okay. --> And I need that display the message with my age. --> That's the exercise. --> We grow in an input box. --> My age. --> My birthday. --> Okay. --> And this place a message with my age. --> So, we need to calculate the years between today and my birthday. --> You know how to do it or we do it tomorrow that? --> Okay. --> I'm going to try. --> But I can't get it. --> Okay. --> And it. --> Yeah, that's very good. --> I think it's integer because it's an H, right? --> The answer I think is integer because it's going to be an H. --> But won't it have a decimal point to it? --> No, because we are going to subtract years and years are integers. --> But what is it, 32.5 years? --> Oh, come on, let's, let's, let's, let's do it. --> Don't worry, it's okay. --> We have a function called year that they start the year of our date. --> Oh, okay, then can you show me? --> Because I didn't know that. --> Yeah, just a function. --> The main function is year, yes. --> Like am I supposed to know that? --> I don't know what to do with this now. --> No, because now, like in the function, open parentheses and write the date. --> Oh, so you're just, you're not writing the full date. --> You're just writing the birthday year? --> I'm going the other way. --> Are you okay? --> Are you all right? --> Yes. --> Okay, I'm going to do it. --> I'm going to try to do it. --> This is some page from the new year. --> And I'm going to use current date. --> I'm going to use the age as integer. --> Okay. --> We're going to use another page since input date. --> Okay. --> Now, this is input path. --> Print date. --> We're going to, and this is going to see tomorrow, but I'm going to now just to see it. --> We have see date. --> See they transform a string to date. --> So input date is a string, right? --> I wrote in the input box a string looks like a date. --> Okay. --> But I did that the time is a date. --> So I transform this string using this function to a date. --> So birthday really is a date. --> Do you credit this or not? --> I've just never seen that see date before. --> I don't know what that is. --> I haven't looked it up. --> Yeah, okay. --> So I think that this function, another or like that, we're going to see tomorrow. --> It's better. --> Okay. --> Right? --> It's better. --> So I'm just going to do the example in this one. --> I'm going to do it tomorrow. --> Okay. --> Yeah. --> So tomorrow we'll see at the same time, nine o'clock. --> Okay. --> I'm going to and we're going to do more practice. --> Yeah. --> Okay. --> So see you tomorrow. --> It's time. --> Okay. --> See you tomorrow. --> See you tomorrow. --> Bye. --> Thanks. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay. --> Okay.