Excel VBA Basics - No Coding Experience Needed! | Philip Koehler | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Excel VBA Basics - No Coding Experience Needed!

teacher avatar Philip Koehler

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

13 Lessons (48m)
    • 1. Intro

    • 2. Why VBA

    • 3. Set Up VBA

    • 4. Creating Your First Macro

    • 5. Select

    • 6. Copy & Paste

    • 7. Changing Values

    • 8. Open & Save

    • 9. If Statement

    • 10. Looping

    • 11. Sharing Your Code

    • 12. You Got Stuck

    • 13. Advanced

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Are you thinking about getting started with Excel VBA? Then this course is for you. We will set up VBA and create our first Macro! No coding experience needed!

At first, we’ll look into why you should learn VBA. What is VBA all about and what can be done with it. Then we’ll set up VBA together within Excel. This will be very easy and quick. At last, we will create a Macro together.

The whole course will be easy to follow and no prior coding experience is needed.

If you enjoy the course, please leave a review and check out my other courses! I am creating more VBA (and other) down the road and if you want to stay in the loop, please subscribe.

Also, feel free to ask any questions that you might have. Coding can be intimidating at first but VBA is a great start into the coding world. I started using VBA for my Business Excellence job and now I am using Python for certain projects as well. It is like learning “regular” languages, once you learned one foreign language the next one will be even easier to learn.

Let’s jump into the course and let’s get started with coding!

Meet Your Teacher

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Intro: Welcome to our beginner VBA course. My name is Philip and I'm going to be your instructor for this course before we get started, I wanted to let you know that absolutely no coating is needed for this course. The only thing you need for this course is Excel. As long as you have Excel installed, you're good to go. And what will you learn in this course and this course, I'll teach you how to set up VBA and how to write your first ONE macro. Why should you learn VBA? While VB is super powerful, it's widely being used in offices and at universities, and pretty much everything that is repetitive can be automated with it. How will you learn VBA? We will work together on a sample project that is straightforward and it will teach you the basics of VBA. In PO2 of this tutorial, we will look into the most used VBA code. So you will learn, for example, how to copy and paste or how to format yourselves. And this has not been sequenced. You can just browse through and pick the class that you need and start from there. I'm looking forward to seeing you in class. And let's get right into it. 2. Why VBA: Wildland VBA, because it makes your life easier. You can automate repetitive and boring task and focus on those projects you actually like to do. So is VBA powerful? As you can guess? Absolutely. I'm a big fan of EVA. You can do so many different types of things with VBA, you can create your own formulas. You can say auto form of tables. You can even build web scrapers. And yes, it can even send e-mails from Excel. So this program, this program language is super powerful and you want to know maybe, is it difficult to learn? Well, like everything it has learning curve, but it's a really, really beginner friendly programming language. It has an easy syntax. That means if you see the code, you can read it and it looks almost like plain English. Then the next really big benefit is that most users have Excel installed. So that means if you want to share your code, you can send your code to a colleague and he or she will be able to run it fairly easily without installing any big programs like Python. And VBA offers even more than that. It offers step-by-step execution. You can execute the code line-by-line and really easily understand what the code actually does and it makes it really easy to find errors. And now the nicest thing that VBA offers for beginners is the macro recorder. You can click the Record button and then write your formulas in Excel format your table, and click Save and VBA recorded everything in the background. And now you can just click the play button and VBA repeats all of the steps you just did. So this is super powerful, and especially this means you can write your own macros. You can write your own code without actually writing any code. You just click record to the things, to the steps and click Save. And that's how easy it is. So let's jump right into it and see how we can enable VBA for XR. 3. Set Up VBA: Let's look into Excel and enable VBA. The first thing we're gonna do is go onto File on the top left. Then we're going to go all the way to the bottom two options. And here we can see Customize Ribbon. So we'll click on Customize Ribbon. And then we see on the right-hand side this whole pain. And then pretty much everything is going to be enabled bot developer. So we can just check-mark development and click Okay. And now you see that on your top ribbon here. And new tab came up called developer. And now you successfully enabled VBA. So if you click on Visual Basic, which stands for VBA, you can now see the VBA interface. So now that you have VBA enabled, let's look into the user interface, into this window here. In general, it is somewhat straightforward. On in the middle you have the action. We're now that's where you're going to write your code. On a left-hand side and a small window here. That's where you organize your things. You see, for example, here it says she'd won. And that's where we're going to add our macros and I'm going to list up here. Then in this bar, you have this Play button and stop button or reset button. That is where you start your code from, and that's also where you stop it. And the last thing I want to show you just for future references is under tools and references, That's where you enable different libraries. So if you would like to start, let's say with web crawling, do you have to add another couple libraries? And that's where you would do it. And the way that you do it is to do at a macro is pretty straightforward. You just right-click. And then you go to Insert. And you click on module, which is the same as macro. And here we see it that is no glycan type in my, my stuff. And the way that it works, it's, it's somewhat similar to an English sentence. You always start with a capital letter and you end with a period. Same in a macro, you start with SAP. And then the macro name, which is name and test brackets. And then it automatically puts, ends up at the end, which is our period, and that's our capital letter. So that's our walks in VBA. And in-between, you're going to write your different yeah, your codes and your lines. And the last thing I want to enable video guys is under View. And then Immediate Window. And here we see we have another window that popped up. We can just make a little bit smaller and a free, for example, do a calculation in here. Or if we want to test something, then it shows up right here instead of an Excel. So if, if you just want to see what is happening, sometimes this can be very useful. So just make sure that it's enabled. 4. Creating Your First Macro: Are you guys ready to create your first macro? Yes. All right, great, Let's get started. So here you see a sample dataset. Please pause the video and copy it down or create your own dataset. But it's great if you follow along. So after you copy down this dataset, we can click on Developer. And now we see the Record Macro button appear. But before we start, it's always good practice to be really clear about what do you want to do. So what we wanna do is we want to highlight the range we would like to copy. Then copy this, create a new sheet. And then we would like to put in a formula into c9 that averages out. This does arrange here. And then we would like to see the damage cause rating right in the cell. Since we now know what we wanna do, we can click Record Macro. Name our macro. I'm just going to name it my first macro. And then we can click, Okay. And now as you see up here, now already says stop recording. So that means it's currently recording and VBA is recording all of our steps in the background. So what we're gonna do is highlight this data, press Control C, or right-click and copy. Then we create a new sheet. Go to B2, right-click paste or Control V. And now we see we already almost done. And for the last step, I'm going to click onto C9 and write average, the average formula and just highlight the array that I would like to average out. And I click Enter. And now we see the average as 2.2. So it's somewhere between a and a minus. So now we can click stop recording. And now we know the macro has been saved in the background. So what we're gonna do now is click on Visual Basic. And I will see there's this modules folder down here. We can expand that go into module 1. So the macros we'll just line up here if you create 0, the next one would be Module 2 and so on. Just click on Module 1. And here we see My first macro. Very cool. So this is the code that we just created. And the green comments mean they are not being executed. So we can delete them if you like, to clean up the code a little bit. And now to test the code, you just delete the sheet Xi2. So we'd right-click on it and press Delete. And now we would like to just test our code we just created. And now we can just click on this Play button. Alternatively, you can also press F5 on your keyboard and suck super-fast. Now it created everything. We have a new sheet, and here's our formula, average. So now you've created your first macro congrats. 5. Select: Welcome to part two of this tutorial. And Po2 will look at the most commonly used VBA codes. For example, selecting, pasting and saving our workbooks. But before we get started, make sure that you don't know that this worksheet. It contains a dataset which is from Google Trends. And it measures how often people Google, Apple. And the last 10 or 14 years between 20082018. And additionally to that, we also have Visual Basics. And here one module, as you can see, it's already in here. And I include or rotis little macro, which includes the most important code coding elements that you need for successfully coding your macro. So you can see it's structured just like our classes now, we'll start off with Select and then goes on to copy and paste. Then how to change a value and so on and so forth. So the same way the videos are scheduled. And also there is no need really that you start off with select. If, if you already know how to do it, it's fine if you skip it. You can also just watched the videos where you may be stuck or something that you really want to a little bit deeper into. But if you don't know any VBA really, or if you're really just getting started completely, then I would recommend watching all of the videos. All right, let's get started then. So the first thing in VBA, which is really important is selecting cells. So we see we have this dataset here. And I think it would be good for us, a good exercise if you just select the first four rows and try to select them. So how can we do them? So the first thing we do, like always as open Visual Basic. And then we right-click Insert and module. And as before, now we name our module. We can name, name it sub and then name it something like select VBA, command brackets. And now we have our basics here. So the way that we can do it, the way there are several, several ways how you can select them. Vba, my, my favorite is range. So you're right range. And then you start off just to sell, you want to select, so in this case we want to select A4 to B5. So you would write eight A4 to be five. And now, the cool thing is a few, press the period key. You see VBA already gives you a lot of different options. So you can just browse through here and see what, what you can do. And you see there are a lot of, very, lots of different types of options. But we're going to just start off and we'll write, select. And here it comes up, we can double-click, press Enter, or just type it out. And now, if we go through, we can check if you did the right thing. So I'm just going to click somewhere else and then reopen it. And now either you press F5 to run the whole code, or your press F8. And then it goes line by line, which I prefer to do because then if you did a mistake, it's easy to respond. Obviously with one line of code. You know, it's going to be in the one line. But let's say you have 20 lines are more than it gets a little bit difficult to reach C where you did something wrong. So I'm going to press F8. And perfect, now we see it's selected A4 to b5. The nice thing is that we can do the same thing for a single cell. So we can just copy this. And let's say we just want to select A1. We can do the same thing. So I'll press F8 again. So first selects what we already have selected, and then A1. And now you see it's selected A1. So that is my favorite way of doing it. It's pretty straightforward and easy to use. The next way that we're going to learn is referencing an act of cell. So you can write active cell and then type select. You might think, well that doesn't make much sense. Right now for us. It doesn't because we are activating the cells anyway. But if you get deeper into it, this will make sense. Because sometimes you need to reference act of cells. And then that becomes important because you can also write different commands behind here. The next way of doing it is the cells, which is a tiny bit more complicated, but it's for bigger projects, easier to use. So you start off with writing cells and then the row index. So instead of starting off an A1, you start off withdraws. So if we want to reference again, Let's say the month. So it would be row three, column one. So we will put in here three comma one. And then again periods select. And if you run this now, you see now it selects the month. And the cool thing down the road is that you can easily manipulate those numbers. We can see that at some point you can write in, let us, for example, and you assign numbers to that, acts for example. So that is status cool to make your code more flexible. And now let's look into how we can and select Sheets. To do that, I'm just going to add one more sheet here. So we have x0 to know. And let's say, I want to go back to the Google Trends. What I don't know it from there, which they call multi timeline. So the way that we can do it as such, we just write sheets and then rewrite the sheet name. So in this case we are going to write multi and an timeline. And then we're just going to write Select. And now if you run that, we see it switches over to multi timeline. And this is almost the same form, workbooks. So for Workbooks we'll just write books. And then we will write our workbook name, just VBA minus basics. And how important it is important to write the format, you save the workbook. And so in this case, x LSM, which stands for Macro Enabled. And at the end instead of writing select, we will write activates. And now, if you would run this naturally, nothing happens because this workbook is already active. So what we can do is we just create a new workbook with Control N. And here it's called Book 4. And then if we switch back to VBA, sorry, if we switch back to Visual Basic and run this code with F8. Now it switches back to VBA basics. 6. Copy & Paste: In this lesson, we're learning how to copy and paste cells. So let's open Visual Basics. And let's start with a fresh module. We'll name it copy paste. And now we can start right away. So first thing we wanna do as reference our cells. So we learned that in the last lesson. You'll start off at Grange. And we want to copy, Let's say A3 to be for A3. And now instead of writing select, we will write copy. And now if we just test us with F8, you see it already copies those four cells. And now before I continue, if you feel like just playing around a little bit with VBA, just go for it for yourself and see if he can do the next step and copy the things into D3 to E4. Otherwise, I will continue now. And we're going to do the same thing. Refer references, other cells we want to copy it into. So d3 and then into or up to E4. And instead of writing copy, you'll write paste special. And now a free run this again. We see now at copy, copied and pasted into the new cell. 7. Changing Values: Okay, let's actually start manipulating all of our book. So what I wanna do is that I would like to see in which months the interest rose above 50. A 100 in this case means the most interest that Google recorded in that time period. And we'll see that in 2014. And if we scroll back up, then we see it starts off naturally and 2018 for the lower value and then suddenly increases. But I would like to see when it goes over that threshold of 50. So before we start with formulas, which I'll do in another video, we just want to change the title here. If you already know how to do it, then I'll say give it a shot or if you have a feeling for it, try it out yourself. Otherwise, I'll do it now. So we go back into Visual Basic and then module to start off fresh. And then we will just name it. We can name it something like value test. And now what we wanna do is again, we want to reference to cell, we want to change. So in this case here we would like to change cell C3. So you guys know by now how to do it. You're right range. And then you reference the cell c 3, and then period. And now that's a cool thing. You can write value. So if you write a value, you can assign a new value to that cell. And we want to assign the value, let's say max, max indicator. You can name it whatever you want to. And now if you run this code with F8, we see now an added max indicator to our cell right here. And this is a pretty cool way of manipulating workbooks. If you get a dataset every month or every week and you have to format it every time so you can write your code and then it changes all of those values automatically. The last thing in this session we wanna do is also changed the workbook name because that's how I don't know that from Google and it's not a very great workbook name. So let's change that as well. And we're going to do it in a similar way as before. We're going to reference the sheet. So we're going to write sheets. And then we're going to write multi. And then timeline. And no, we will itself riding value, we will write period dot name. And now we can assign a new name and we'll name it data. And now if we go up and press F8, we see a change the data. However, just to let you know a fee, run the whole code again, surface start over and run with F8. We'll see that this works. But now this doesn't. Because we see that the max indicator, even though for us it and change, it actually changed again for maximum Al-Qaeda again to Max and Kayla. However, it couldn't find the sheets multi multi timeline since we already changed it before. There are workarounds for that. You can write, for example, this, which can be useful, but it gets a little bit more confusing. And reference sheet one. So if you run this again, now you see it walked. So this is another way of doing it. Personally, I don't use it too often, but if you change the name names of the sheets frequently, this is a good workaround. 8. Open & Save: Now that we manipulated overbook a little bit, I think it would be a good time to learn how to save our workbook. So let's start off with writing something like safe macro. And easiest way is to write active workbook. Period. And safe. That is, that's all. And if you run this with a 50 or press the Play button, now our workbook is already saved. But there's more than that. The other way we can do as we write active workbook and then Save As. And now we can just name it. So let's name it. Vba basics updated. And now if you run this again, that's eight F5. We see no, it is already saved as the new Voc books or no, we're in a new workbook. The next thing we can do is actually open or old workbook. So the one we just had before, the way that we do do that is we would write books and then open and then filename. And here you see already a bunch of stuff comes up. And we can just copy and paste where walkers or you write it out. So it would be something like C. And then the slash, and then You're right users, your, your user ID and so forth and so on. And that's how you can then open, open the workbook. And the last thing I want to show you guys is that you can also use this in another way, which I think is pretty cool. That's what I use most of the time. And at it's just that you extend that. And you can include the file format. And as just above here, you can determine where it's being saved. So you can write, for example, then something like desktop. Or you write a specific folder. And then you can save your workbook right into it. So the first one and the last one, those are my preferred ways, how I saved my workbooks. 9. If Statement: No, we are getting to the fun part of VBA. We're getting two if statements and later on to looping. So those are the real powerful things now. So as before, we will write sub n And if video or whatever you want to call it. And the way that IF statements work is that it checks if something is true. So if, let's say x is bigger than one, then to this and that, and if it's smaller than one, then do the other thing. And this is pretty straightforward. So we can just write, for example, x equals one. And now we can check if that is true with what we have. So if x is bigger than one, then do something. So what we can do is that we would like to print something like check or bigger or above 50. So the way that we do that is rewrite range, right? We reference the cell. So in this case you would reference C4. And now we would then write dot value as we did before, equals and let's say above 50. And then a free hit Enter and go back. We can now also include an else statement. So if it's not bigger than one, then we can write, for example, owls. We would then write something like else. Range, C4. Value then equals skip or whatever you want to. But I usually just leave it free. So we can just delete that. And right. And if so, that's a way that you do an if statement. We turn now to test this. So this is overseeing, not referencing before, so it's just checking x and x is already hard coded. So that means x doesn't change in this moment. So let's just run this. So now the variable x has the value one. So if X were just 1 is bigger than one, then do this. And if not, and of, and of course, x equals 1, so nothing happens. So that's why it ends the if. No, we can move a step further. So we can actually write that x equals. And then we can write range. And then we want to have before and then dot value. So if you run this now, we see if you hover over the x, now x has the value assigned to it of 47. And now if x is larger than, let's just make it right and type 50. Then write this. And nothing happens of course. So let's pick a cell which is above 50. So let's do covered B28. So we'll just write a B 28. And let's test it again. Snow if you hover over x again, we see the values now 61. And now we see it writes into C4 above 50. But of course, that is actually not what we want. We don't want it to be here. We want it to be below here. And that is how we get into looping. But before we do that, I wanna do tell you guys that even though this is my preferred way of doing it, this is not always the easiest. So if you go into looping, if you remember, we can also use cells. So we would write cells. And then it starts of a row. So over here we start off with drove four, right? So we would write for and we want to put in. Now, that's what we're checking, right? We want to have that x has a value of, let's say 47. So it will be column one, too blue or too dark value. That's just tested. F 847 grid. And now the same here. We don't want to hard code it right, Like right now to rewrite cells. And we want also that it starts in row 4, but now we want column 3. And let's test that. Let's start over at the beginning. It's not causes cells. And let's start off F8. And nothing happens of course. And then FV move this now. So we wouldn't, we wouldn't change your column, you change the first number, the rows. So we remember it was a 28. So we can just do 28. And now if we run this, now we see it worked and it put again about 50 and to S4. And now the interesting part starts with looping. So let's jump into that. 10. Looping: Okay guys, are you ready for looping? That is the most fun part of VBA, I think for myself, at least, because it saves so much time. You can look through large datasets fairly quickly and with minimal effort after you wrote the code once. But this is a really great time saver and helps you to focus on things you actually want to spend your time on. And the good thing is, looping is fairly simple. All you have to add this two lines of code for the loop itself. And the way that loop, looping works is it loops. So it goes back and forth like almost a circle for a set time of times until you tell it to stop. The way we do it is we just write for loopy. That's just a variable. I would like to name it 12. We'll just put a place holder and therefore no ten. And then we'll add next at the end of the code that we would like to look. So that means that no, this code is being looped currently ten times. However we want to loop this code, right? We want to, we want the if statement to check every line of code, and then we want to have 17, right, and here above 50, if this value is above 50. So we have to find out how many values we have here. The way we do it is just press Control and Shift and hold it, don't and don't error. Note highlighted all of the cells. And we see in total they are 132 cells. So let's reopen VBA and just put a 132 in there. However, as you may know, nothing will happen right now, but the looping, there are no real changes. Because x is always 61. And it always checks the same. Therefore the same row and writes the same thing into row four, column and column 3. So nothing really changes the whole time. And what we want to change is the row number, right? We want that it goes from REF, row four to row 5, row six, and so forth and so on. And we can do that by instead of hard-coding the 28, we'll put in a variable in here. I like to call that variable counter. So I'll name it counter. And the counter starts where we wanted to start. So row four. So let's put it, put an a for Don there. And now if you run this, you'll see now corner equals four. So we can now replace the row here and the arrow there. And now if we run this line, but F8 will see that counter is no four. And so know this cell is referring to sell four comma two. So 4 and row 2, column 2, sorry. So it is referring to right now to 47, which is great. And however, we're not done yet, but almost almost done. We'll have to know at one corner right now it's just looping through force or nothing really changed because nothing is happening in counter. So we have to tell the counter to go one up every time it loops. And we'll do that by writing before the next line here, we'll write counter equals counter plus 1. And now if we run this, it'll mean that four plus one is the new corner, so that no new counter will be five. So let's test that. And let's press Play and suck superfast. You will see wherever the value is now above 50, it'll add above 50. 11. Sharing Your Code: You created the code no. And you would like to share it. Let's say you want to share with your marketing team. And they're not very familiar with VBA. So you can expect them to go into the VBA code and change the values. So let's say they get a list from Google every so and so often. However, the list is not always the same length. So what you wanna do as you want to make this flexible. So maybe one, onetime at 61 time it's a 1321 time, it's 200. So what we wanna do is we would like to create a message box. And the way that we do it is we first write, for example, my answer. So we create a variable, then equals to input box. And then we will write what we want to know. So o often should the code loop. So that's the question and the message box title, you can just write loop. And now we can write at the end if you want to a place holder. So let's say if the most of the time it should look upon with 32 times, we just put in a 132. And now if you run this with F8, will see this textbox box comes up. And now we can put in a value. So we want to put a number 32. So we'll just click Okay. And now we see that my answer has the value of 132. This is pretty cool because it makes the code very flexible. So now we can replace a 132 with my answer. And now if you wanted to, we can share it and they can open the code and run it. And now it comes up and take, just have to put it into the textbooks instead of changing the code itself. But as you see, it is not super useful if they open the code itself. So let's just X out of here. And now let's create a button. And we just click on Insert and a top left button. Create this button doesn't have to be that big. And after we created, it asks us which macro we want to assign it to. So we call it f video. And let's click OK. And now we can just name it. Let's call start, start code. And now we could send this file to the marketing team. And to test it, we can just click No and start code. It will come up with this message box. Now we can put in our number, let's say a 132 click, Okay? And now it loops through fast. Nothing changed because the values were already in here. But we can test it again. And if you click it now, 132, Okay, and now we see an updated. So this makes it really useful and easy to share your code. 12. You Got Stuck: You got stuck. Novartis, everyone gets stuck. All the time. I get stuck. Probes get stuck. Bill Gates gets stuck. Everyone gets stuck when coding. That's nothing new. And that happens sometimes you just mistype something and the code doesn't run through. And sometimes you actually get stuck in just don't know how to do it. Luckily, VBA offers a bunch of workarounds. So the first thing you should do when you get stuck is to record a macro if you can. So let's say you would like to do the same thing here. So you would write, would like to write above 50 if those values are above 50. So instead of going straight into VBA, you can also just record a macro. So let's do that. So let's click Record Macro, OK. And now we can write our formula. And here, if this cell is larger than 50, then we can write above 50 and otherwise we write nothing, right? So this is the formula we would usually write. And now we're just going to click on that, expand all the way actually to the bottom. And now we see nothing really changed because it's the same values. But if he clicks, stop recording and go into Visual Basic. Now we see that Excel recorded the stuff for us. And this is pretty great because now we see how Excel did it. So, uh, put in the active cell the following formula. This is a little bit difficult to understand. And you don't, most of the times I don't use it. Most of the times you can use what I have my cheat sheet on advanced, which we'll look into in the next video. Then it drags it down. First we did it to a cell 27, right? See 27, I mean, and then we did it again and then we went from all the way from C4 to see 135. And yeah, that's, that's how Excel did it. And if you want to replicate that, you can just copy this line of code and to other projects. For example, if you want to see how to full columns or rows. So this is really powerful. And the other way of doing it is just Google. That's really straightforward. You can Google it. And most of the times people off or answered that question already online, you I'm pretty sure you'll find most of the answers online. And if you don't, you'll find some kind of closed and sometimes it gives you, let's say, some part of the answer. And then after you get the first part of the answer, you can figure it out yourself. So really the first thing is used a macro recorder, and then next thing as Google, it. 13. Advanced: Congratulations, You made it to the last video of this course. Now we have a basic understanding of VBA. But before you go into the big wide VBA world, I just wanted to share a couple of important formulas on lines of codes video that I frequently use. The first one is right here I highlighted. It's a way to write regular Excel formulas in VBA. Here you can see that if you type period formula, you can write pretty much the same formulas you were derived into regular Excel. So if you execute that with F8, we see no, it's summed up everything in before to be 10. So that is very useful. And see in a video before the macro recorder uses a different format, which is not as easy to read as this period formula format. The next thing is wait. Sometimes, especially, especially if you get into web crawling, you have to let the program rate a little bit before you continue. And the rate as you do it is this way, you just type in the hour, minutes, or seconds, and that's how long the cord stops before it continues. The sometimes this can be very helpful. The next thing is sent keys. Send keys is pretty useful tool, especially for web crawling as well. You can replicate your keyboard strokes. So if you write send keys, Let's say hello, then you run knows almost reads it as if you were writing hello. So that can be pretty useful as well, especially tab and enter is something I use in web crawling. And then speeding up your code. So if you have something that is taking a long time or very large datasets or something where even when you just open a file itself and exit gets to its limits, then it makes sense to include those four lines of code before and those four lines of code after your actual code. And this will help to speed up your code. And then the last thing I wanted to share, which is very useful as a few have an error. Sometimes if you walk with complex projects, you can't foresee everything and you don't want to think or don't have time to think of every little thing that could go wrong. So there's error handler could be really helpful. So what you do is steady right on error go to, and that's where it should go to when you continue to code. So over here, so you just place the code that could have an error right in-between. And onError Goto. Continue with code and then it goes to continue with code and goes from them. So this can be really helpful in many cases. I hope you guys see how powerful VBA can be and what you can do with it, play around with it. And if you would like to see more courses, if you would like to see in-depth stuff, please check out my other courses. And if this course helped you, please leave a rating. Well then guys, happy programming and have a nice day. Bye bye.