
An introduction to the course
In this lesson, will learn about the range object and how to use it as if you're typing into cells yourself.
Now let's add a little spice to our macro!
How to go line-by-line when you want to analyze your code more thoroughly.
There's more than one way to skin that cat! Macros are designed to be triggered a number of ways. In this video we'll discuss this.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "01 The Range Object\Exercises" folder. Please open "Exercise 01 - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
You don't only have to use the cells names, you can also use named ranges. Check it out!
Value returns the actual value of a cell, not it's formatting, eg: 12.5 instead of $12.50
Gleaming the row or column of a range you're working with can be very valuable. Learn how to wield this tool now!
If you click on a cell or highlight several cells, you've just selected them. Turns out, Excel can automatically select things - like a ghost clicking around for you!!
This isn't the same as the worksheet function COUNT, this simply counts how many cells you have in the range, not how many aren't blank.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "02 Range Properties\Exercises" folder. Please open "Exercise 02a - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Address brings the exact location of the cell or range you're referring to, such as $A$2 or A1:B3.
Change the formatting of your ranges on the fly with this handy dandy tool.
Everybody needs to know how to automatically make ranges Bold, Italic or Underline!!
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "02 Range Properties\Exercises" folder. Please open "Exercise 02b - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Pinpointing which cells you want using rows and columns, almost like latitude and longitude for coordinates. Very useful when we use loops in the lessons to come!
You don't have to use column 2, there's a way to use B instead when using the cells object.
More on the cells object. . .
Quick tip on making changes to all cells in a sheet - easy.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "03 The Cells Object\Exercises" folder. Please open "Exercise 03 - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Sandwich these two concepts, the range object used with the cells object. Cool!
Using variables is important and fun! They make calculations way easy!
Sometimes you have to let Excel know what to expect when using variables.
Here, let me give you some cool examples.
Concatenation is just a fancy word - it's easy.
In this short lecture, we learn about Date and Time built in variables that assist us in making calculations based on the time or date the user interacts with our program! Fun!!!
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "04 Variables\Exercises" folder. Please open "Exercise 04 - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
These special variables shouldn't change, so lets tell excel what they are, and we can use them anytime, anywhere!!
Sometimes you want to use your current variables in another procedure. Sometimes you just need to throw the value in there but don't want it affected in the original procedure, other times you want to manipulate the original so it's different when you get back to the originating procedure. Here's how to do all of that!
All the cool things you can do from the file menu, including importing and exporting modules or userforms. neat
Now the Edit menu.
View Menu has some neat things and perspectives for your macro and/or variables. . .
really useful things. Watch this now!
All about the insert and format menus
Last but not least on the Menus. . .
You'll need to memorize this one-liner, but it's easy once you know what it means.
Very similar to last row.
Really really easy to grab the Next row in your set. Great for auto-data entry.
How to record a macro and use it to LEARN!!
How to Sort dynamically, even when more rows are added. No more hard-coding!
More on the recording tool.
Want to save a lot of keystrokes? Listen to this lesson.
Here's where the fun begins. . . If Then statements are super fun and help you arrive at the logical conclusions you need to pretty easily.
Another logical tool.
Using the word NOT to negate a statement.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "06 Super Important Tools and Excel Logic\Exercises" folder. Please open "Exercise 06a - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Adding the "Else" aka otherwise part of the IF THEN statement.
Don't let text mess you up when comparing to numbers.
Save space and use a one-liner of code for your basic If Then statements! Easy!
Jump to different areas of code like a teleportation device!
Try this on for size to save keystrokes when using If Then statements. It's nice once you get used to it.
"Do you like Excel VBA? Click Yes or No"
In this lecture, you'll learn how to let the user select yes or no and navigate the macro depending on their choices. Very powerful and yet simple to utilize.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "06 Super Important Tools and Excel Logic\Exercises" folder. Please open "Exercise 06b - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Learn how to create your own functions that work within cells with the equals sign just like =SUM, or use them within macros to simplify code!
Loops help us analyze data, as well as write data. Every VLOOKUP you've every used has a built in loop to go from one row to the next and find you the answer. We're going to make our own loops and tell it when to start and stop. It's super fun and easy once you learn the basics. Check it out!
Now let's make it interesting. . . add some spice to our first loop.
We'll start with a basic loop to analyze all the rows in our data set.
An InputBox is a tool to get insight or data entry from a user.
Everyone wants reports that can go to the printer and look good on paper. Learn the basics to this valuable skill.
Get the data you need on the correct sheet in the correct row and column!
You need to clear out the last report you wrote onto the report sheet.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "07 Loops and Report Writing Basics\Exercises" folder. Please open "Exercise 07a - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Add an Auto-Print Preview. It's fun and useful!
This will loop through each item in a group, like objects or cells in a named range or shapes/buttons on a page or userform!
DO Loops are a bit different as you don't define the start and end points so clearly. Very interesting though!
Fun BONUS Lecture! - Learn to scrape data from files in a folder and plug them into a central 'Master' workbook.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "07 Loops and Report Writing Basics\Exercises" folder. Please open "Exercise 07b - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Trigger a macro on a worksheet through various means. Change event is when anything changes on a sheet, your macro is triggered. Cool!
When the worksheet is opened, this macro can be triggered.
This is triggered when de-selecting a sheet.
Only used with sheet deletion, but interesting. .
Trigger a macro by double-clicking either on a specific cell or cells OR anywhere on the sheet.
Right-click triggers!
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "08 Worksheet Events\Exercises" folder. Please open "Exercise 08a - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Triggered whenever calculations occur.
This is pretty neat. The worksheet listens until something changes on that particular sheet, then you can customize where it's listening and what it DOES!!
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "08 Worksheet Events\Exercises" folder. Please open "Exercise 08b - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
a Hyperlink Trigger.
A few lesser known, lesser used Events and my final thoughts on the matter.
This event occurs when the workbook is opened.
When any chart, worksheet or the workbook itself is activated/selected.
Right before the actual Save occurs, you get a chance to run this macro automatically.
After Save event occurs, you get to recap with this macro. Even can tell you is save was successful or not!
Occurs before the workbook closes. If the workbook has been changed, this event occurs before the user is asked to save changes.
Occurs when the chart, worksheet, or workbook is deactivated.
Occurs when a new chart is created in the workbook.
UPDATE: In Excel 2010 or earlier, you need to Use the Ch.HasTitle = True in order to create a Title that can then be edited. In 2013 the title came with it automatically. Sorry bout that. Here's the sample code:
Private Sub Workbook_NewChart(ByVal Ch As Chart)
Ch.HasTitle = True
Ch.ChartTitle.Text = "My Custom Chart"
End Sub
Occurs when a new sheet is created in the workbook.
Please download this exercise from the "Course Files Download" zip file, or Download the single Question file here.
This will be located in the "09 Workbook Events\Exercises" folder. Please open "Exercise 09 - Question.xlsm" and click on the "Objective" tab to view your tasks. The following video will show the solution step-by-step. If you need help, you may refer to the "Answer" version of this workbook with full source code to look at.
Happy Coding!
Dan
Solution video for this Exercise. Solution workbook is also attached to this Lecture as well as found in the "Course Files Download" folder!
Occurs when any sheet is activated.
Occurs when any sheet is deactivated.
Occurs when any workbook window is activated.
Occurs when any workbook window is resized.
Finally - how to use a simple Button on a worksheet!
KeyDown is triggered when someone has pressed a keyboard key. Find out how to harness this toll in this video.
When using Keydown event, you can check to see whether Ctrl, Alt, Shift or any combination of them was pressed in addition to using the Keycode checker. This is awesome!
KeyPress is similar to Keydown. check it out.
When you hover the mouse over something. . . fun control.
Learn all the fun subtleties with MouseUp
Learn about these events, triggered based on when they are in focus, such as tab, enter or clicked.
LinkedCell joins a cell on a worksheet to the value of a control.
Option button, either this or that but not both!
More on option buttons with this stimulating quiz!
Make sure people make a choice - or the macro will let them know they need to still do some things.
Use cell A1 with a spinbutton
Spinbuttons with textboxes and what to watch out for when using numerals as opposed to text.
A little more fun before we leave the SpinButton. . .
Using dates with a textbox is tricky. Watch this for some tips that are sure to save you time!
How to use the control called "Label". fun!
One popular way to fill a combobox, but with this method you can't be choosey. You need to know this, but later we'll address a more customizable method.
YOU NEED TO LEARN THIS! Now!! :)
Comboboxes don't have to just be one single column of information!
Learn what a ListBox is and how to kick butt with one.
Here's how to use a Listbox on a worksheet
How to handle a multiselect listbox, where users can select more than one item!
Now we get really choosey with dynamic filtering and manipulation using .ADDITEM. Awesome!!
Did you know you can have data that's invisible, but you can still use it in your listbox? This is an awesome trick
Scrollbar examples.
Add a picture and click event to lead to a website.
Toggle buttons and the joy therein
There are other controls you can download and mess with. May be glitchy, may be awesome. Use at own risk, read up by googling them
Teach Excel to Do Your Work FOR YOU. . .
Microsoft Office is everywhere, installed on over 750 million computers, but most users only know how to set up a basic table or maybe even do a few formulas here and there.
In my course, I teach you how to take Excel by the horns and make it do whatever you want, whenever you want. It can go through loads of information and create a printable report for you. You can make custom forms so that you can access, analyze, edit, or add new information quickly to your data tables/ worksheets.
Excel programming utilizes a simple but effective tool called "VBA" - the hidden programming language that runs quietly in the background while you work. It’s very easy and straight-forward to use.
I'll show you the easiest tricks to learn this basic language in a fun, progressive method. Learn at your own pace. With each of my short, info-packed lectures, you'll learn another essential skill that you can immediately use. You'll find yourself handling these Automation tools instantly and in any spreadsheet you already use every day. If there's one thing I'm good at - and my students are good at - it's AUTOMATION.
My motto is, "If I'm not making everybody's job easier, quicker and more enjoyable, I don't deserve to have this job" - and that's what I live by.
Take this course and access your true potential.
Oh, and I want to be the first to hear about your New Raise you get once you're making Excel Programs and running everything on autopilot for your co-workers!
-Dan
Here's what some of the students are saying:
“I love this course. Extremely easy to follow along. If you are looking to learn more about Excel this is it!” - Jim C.
“Loving this course! The information is presented quite clear and concise, and it is a really great way of learning VB really fast, yesterday I was a total ignorant of the subject. Today I programmed my first macro and cannot wait to learn more.” - Marcela T.
“I had experimented with VBA previously, but I really feel like this course is exactly what I needed to take my Excel knowledge to the next level. In only 2 weeks I've improved my reporting exponentially and it's all thanks to this course!" - Ryan S.
“You can't go wrong with Daniel Strong!” - Steven S.
“The presenter explains in detail and demonstrates what he's covering, easy to follow along and learn!” - David B.
“Teaches you the fundamental of VBA programming without any prior experience. Shows with easy to follow Example!. thanks for the video!” - Sean C.
"I've taken several different VBA courses here on Udemy and this one from Daniel is by far the most interesting and easy to understand. I've done exactly 107 lectures so far and already was able to automate 80% of my tasks at work that I've been doing manually for years... I'm angry with myself because of the time I wasted by not buying this course earlier. I can't even imagine what I will be able to do after finishing the entire course :)" - Robert
“Well explained, easy to understand lectures. Enjoyable and informative videos.” - Marlena
“Very clear explanations broken down in short videos. Daniel goes at a slow pace that is easy to follow and understand, even for people with no programming experience.” - Gustavo P.
“Best course on VBA ever taken. Thanks a lot!” - Nikita L.
“This is an excellent course!!! There's a lot of good, useful "stuff" here. The examples are practical and real-world!” - Todd W.
“Wow, I thought I knew a little bit about Excel but clearly I had only seen the tip of the iceberg. This course has opened my eyes to the true power of VBA within excel. Great course, fantastic instructor.” - Scott K.
“By large and far, one of the best step by step guide to VBA programming I have ever seen. I have been playing around with VBA for over a year now, have watched countless videos and have read numerous articles and "How-to" guides, but I have never seen something this complete, this throughout. I am amazed at how little I actually new about the VBA world. Thanks a million!” - Alex B.
“Everything I have been looking for, you would have to buy multiple books for this level of instruction!” - Luke S.
"Excellent VBA basic to advance tutorial." – Sandeep G.
“This course is good for beginners and for experienced programmers. Experienced programmers may want to skip through some sections on basics, but it is good to see how the basics work in the context of and excell worksheet. He goes over different events and triggers (like buttons) to execute code. This is a really good course if you plan to do some pretty complex vba code with forms and reports.” - Christian H.
“Very helpful if you do any type of data analysis.” – Jonathan D.
“I think this is an excellent gateway to the tools we need to use going forward. I like the
hands on nature.” – Andre C.
“Much better than other classes and seminars. Great course.” – Mark S.
“The instructor made VBA easy and straight forward to use.” – Min Z.
“Very thorough and practical.” – Juan S.
***Now Available for Offline Viewing!***