
Master excel vba to automate tasks and build applications, exploring practical scenarios, tips, tools not normally taught, count and sum, text functions, cell navigation and worksheets, user forms and controls.
Discover how Excel VBA automates manual tasks, updates large data and charts, and formats data by accessing the VBA environment via the Developer tab and inserting a module.
Learn what sub means in VBA, where sub is short for a sub procedure. See how macros record steps and run as a sub procedure.
Learn how to declare variables in VBA using dim, store values in memory, and choose data types like integer, long, string, and variant essential for your VBA code.
Identify how comments in VBA start with an apostrophe, describe code behavior, improve readability, appear green in the VBA editor, and do not affect the code.
Explore the immediate window to quickly inspect an open workbook by evaluating VBA code, such as ActiveWorkbook.Worksheets.Count, and see results like four worksheets after adding three.
Use the debug.print statement to output variable values in the immediate window, enabling quick checks during code debugging without storing data in worksheets or message boxes.
Create a message box in the VBA editor that displays a prompt saying this is my application, with the prompt as the only required parameter and the rest optional.
Create an input box to prompt for user values, capture the entered text (ok or enter), and place it in cell A1, returning an empty string on cancel.
Apply generally accepted code indentation rules to VBA code to improve readability and debugging. Contrast the left, bad indentation with the right, good indentation to reinforce best practices.
Improve readability of VBA code by inserting line breaks midline with a space and underscore before the break, signaling the VBA compiler that lines continue.
Save your VBA workbooks as a binary file to reduce size and speed up loading and saving. Save as an Excel macro-enabled workbook when using the standard save option.
Here is the solution to the first assignment.
Learn to create and rename worksheets in VBA using worksheet.add or sheets.add. Rename via activeSheet.name or sheets.name, and use the debug steps (F8) to practice.
Explore how the set keyword in VBA assigns a worksheet object by creating a worksheet variable ws, setting it to sheet1, and renaming it to my animals.
Show how to hide and display worksheets in Excel using true or false parameters by running code that hides the mechanical parts worksheet and then displays it.
Move a worksheet in Excel VBA by placing the electrical part worksheet before the civil arts worksheet, then run the program.
Copy the active worksheet to three workbook positions: end, before the outline worksheet, and after the outline worksheet.
Explore practical ways to write to a worksheet in Excel VBA, illustrated by an example.
Learn practical worksheet formatting in Excel VBA by applying bold fonts, blue and red font colors, and underlining text, then run a program to see the results.
Master the methods to delete a worksheet in VBA while ensuring at least one worksheet remains in the workbook and handling the delete confirmation prompt.
Work with worksheets through a practical assignment that reinforces the Excel VBA concepts learned in the lecture.
Here is the solution to the second assignment.
Learn how to select cells in Excel VBA, including concepts like the active cell and examples showing different selection methods.
Master the Excel VBA offset function, which moves a starting cell by specified rows and columns using positive and negative directions, illustrated by A4 to A5 and B7 to D4.
Identify the last used row in a worksheet to select a known range or adjust dynamically. Observe the last used row changing from 10 to 11 as data is added.
Identify the next blank row, defined as the last used row plus one, to add new records and set up input boxes for columns a, b, and c.
Create a for next loop in VBA that cycles through a range of values, executing code for each cell, writing cake in column B from row 2 to 10.
Master the for each loop in Excel VBA by iterating through every worksheet in a workbook with a wsheet variable and displaying each sheet name in a message box.
Explore how an if statement compares a value to expectations, yielding true or false results, with A3 matching test or homework affecting A4 display and font color.
Here is the solution to the third assignment.
CountA counts non-blank cells in a range, demonstrated by a VBA example that sets arg1 to a range (A2 to last used row) and writes the result to C2.
Learn how the countblank function tallies blank cells in a range. See an example where arg one spans A2 to the last used row and outputs the count in c.
Countifs counts cells that meet one or more criteria, using dates, numbers, text, and wildcards. Use two ranges, optional second criteria, across data and summary worksheets.
Explore how the Excel VBA sum function computes a range total by offset from a starting point, retrieving east and west values, and summing them into a total variable.
Explore how the indirect function converts text strings to cell references, build dynamic ranges with the ampersand, and sum D4:D8 to get 57, with VBA alternatives.
Explore the Excel VBA sumifs function to sum a range using criteria, with the sum range and criteria range matching in size, illustrated by a school supplies example.
Here is the solution to the forth assignment.
The right function extracts characters from the right of a text string. Use it to get last character of each name in column a and place initial in column b.
Master the left function to extract characters from the left of text. See how the first initial from each name in column A is placed in column B.
Use the mid function to extract characters from the middle of a text, with text, start, and length arguments, including locating the first space to get the middle initial.
Use len function to measure text length by counting characters, including numbers but excluding formatting, apply to city names in column b and place results in column d.
Learn how the trim function removes extra spaces, leaving single spaces between words and eliminating leading and trailing spaces in text, demonstrated on data in columns A, B, and C.
Use the text function to convert dates and numbers into formatted text, a string formula, and display month, day, and year in separate columns, or convert telephone numbers.
Explore the Excel REPT function to repeat characters a specified number of times, using an input box to set repetitions and filling results in column B based on column A.
Learn how the substitute function replaces old text with new text in a string, using original text, old text, and new text, with a practical example and results.
Here is the solution to the fifth assignment.
Learn how the Excel VBA tool box adds and manages user form objects—labels, text boxes, and command buttons—to display or edit data and run macros.
Use the select case statement to route code based on the combo box value, displaying a message box when apples, oranges, or grapes are selected.
Open a user form automatically when Excel starts by creating and naming it 'my app form', adding a 'continue' button, styling teal, and showing the form on workbook open.
Build a user form in Excel VBA, configure a combo box caption and name, add label with font size, set a background color, and run sub procedures from a button.
Here is the solution to the sixth assignment.
Review practical Excel VBA insights not commonly taught in Part I, and hear the course highlights and closing remarks that reinforce key takeaways.
Thank you for taking the course!!!!
You can use the Instr Function in VBA to test if a string contains certain text. The result is the number of times the specified text appears in the string.
What will I learn from this course?
This course will show you the various techniques on how you can use VBA to get tasks created quickly. This course will show you how to automate manual tasks so that you can do your job more efficiently than before.
Go beyond the basics
Unlike other Excel VBA courses, this course will show you Excel functions that are not normally taught and also explain how they can be used in a real world scenario. Most Excel VBA courses only scratch the surface and explain the very basics. They will talk about functions like the Offset function, but won't explain why it is used or how powerful it can be used to automate a manual task such as to populate missing data on several rows and columns. This course will explain this function and technique in depth along with many other functions.
What is the Course Structure?
This course will walk you step by step at your own pace showing you the fundamentals of Excel VBA. This course is broken down into 6 sections. Each section will begin with a lecture followed by a demonstration of that lecture. There will be a quizzes throughout each section and an assignment at the end of each section that will test your knowledge and understanding of the material covered.
What is in this course?
This course is packed with over 50 lectures, 50 demonstrations, tons of quizzes, 6 assignments, and bonus and resource material that will help you better understand the concepts of Excel VBA.
What level should I be at after taking this course?
After you complete this course, you will be at the Intermediate level with Excel VBA. This of course assumes that you will consistently practice the concepts that will be discussed.