Excel VBA course

VBA Tutorial

A structured path through every lesson in the VBA Tutorial category, so you can learn macros, objects, loops, and arrays in order.

44 Lessons
8 Chapters
3+ Hours of reading

Syllabus

Learn VBA in order

Every article from the VBA Tutorial category, grouped as a course you can follow in order.

Chapter 1

Getting Started

  1. 01 Excel VBA Tutorial VBA (Visual Basic for Applications) is a language that is common to visual basics that can only work through a host application (Excel, in… 5 min VBA Tutorial
  2. 02 VBA Editor The Visual Basic Editor, also known as VBA Editor, VB Editor, or VBE Editor, is a separate application that first needs to be familiarized… 3 min VBA Tutorial
  3. 03 VBA Comments VBA Comments. Comments are lines of code skipped over when the code is run. In the coding, these are shown as green text. Descriptions… 3 min VBA Tutorial

Chapter 2

Language Basics

  1. 04 VBA Dim In Visual Basic for Applications, the term "dimension" is represented by the VBA Dim. It also helps to set the names and types of… 3 min VBA Tutorial
  2. 05 VBA Variables What are VBA Variables? A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in… 5 min VBA Tutorial
  3. 06 VBA Data Types In this tutorial, you'll learn about different numeric and non-numeric data types supported in VBA, as well as data type conversions. We encounter many… 3 min VBA Tutorial
  4. 07 VBA Constant VBA Constant. A constant is a named memory location that holds a value that cannot be changed during script execution. If a user tries… 3 min VBA Tutorial
  5. 08 VBA Option Explicit Option Explicit helps to define variables when writing code. It's possible that the developer misspelt a variable or forgot to define it in his… 3 min VBA Tutorial

Chapter 3

Operators

  1. 09 VBA Arithmetic Operators VBA Arithmetic Operators are used to perform operations such as adding, subtracting, multiplying, and dividing of numbers. In these operations, numeric values are calculated… 4 min VBA Tutorial
  2. 10 VBA Comparison Operator VBA Comparison Operator. Comparison operators can be used to compare numbers or strings and perform evaluations. Expressions using comparison operators do not return a… 4 min VBA Tutorial
  3. 11 VBA Logical Operator VBA Logical Operator. Let's say you Want to Take a Customer Order, and for that, you First Want to Check Whether the Ordered item… 3 min VBA Tutorial
  4. 12 VBA String Operator VBA String Operator. String operators are used to manipulate string data. A string can include alphabets, numbers, and special characters in a sequence. A… 2 min VBA Tutorial

Chapter 4

Loops & Conditions

  1. 13 VBA Select Case VBA SELECT CASE is a statement for testing multiple conditions. In this Statement, you can First Define a Condition and Then Specify a Code… 4 min VBA Tutorial
  2. 14 VBA Loops VBA Loops. This VBA Loops tutorial shows you how to use the different types of loops in VBA such as For Next, For Each,… 4 min VBA Tutorial
  3. 15 VBA For Loop As we've mentioned already, loops are used to repeat a set of statements as many times as necessary until a given condition is met.… 4 min VBA Tutorial
  4. 16 VBA For Each Loop VBA For Each Loop.  A For Each loop is used to execute a statement or a group of statements for each element in an… 4 min VBA Tutorial
  5. 17 VBA Do While Loop VBA Do while is a loop in which you have to specify a condition, and that condition must be true for the loop to… 3 min VBA Tutorial
  6. 18 VBA Do Until Loop The Do Until loop is a useful Excel VBA function that repeats a series of actions until the statement is FALSE. When the statement… 3 min VBA Tutorial

Chapter 5

Excel Object Model

  1. 19 Excel VBA Objects Excel VBA objects are code-and-data "entities." Objects are helpful because they can contain other objects. Workbooks, spreadsheets, cells, ranges, rows, columns, and shapes make… 4 min VBA Tutorial
  2. 20 Excel VBA Range The VBA property "Range" allows you to narrow your selection to a single cell, a range of cells, a row, a column, or a… 3 min VBA Tutorial
  3. 21 VBA Events Visual Basic for Applications (VBA) is a programming language used primarily for automating tasks in Microsoft Office applications, such as Excel, Word, and PowerPoint.… 8 min VBA Tutorial
  4. 22 Excel VBA Find The Find function is often useful in VBA. You can use the Find tool to know a specific value or format in a group… 3 min VBA Tutorial
  5. 23 VBA VLookup One of Excel's most powerful and flexible tools is the VLookup feature. It's common to be compelled to code a VLookup macro in Excel… 3 min VBA Tutorial
  6. 24 VBA Workbooks Open VBA Workbooks Open. A workbook is an object in Excel VBA. It can make chart sheets, cells and ranges, shapes, and chart objects, among… 4 min VBA Tutorial

Chapter 6

Arrays & Strings

  1. 25 VBA Arrays VBA Arrays. The C programming language provides a data structure called the array, which can store a fixed-size sequential collection of elements of the… 6 min VBA Tutorial
  2. 26 What is Array in VBA What is Array in VBA Excel? An array in VBA Excel is a collection of data items that are stored in a contiguous block… 7 min VBA Tutorial
  3. 27 VBA ARRAY Function VBA ARRAY Function. Arrays are useful to group objects that are the same in any programming language. VBA is based on the same idea.… 3 min VBA Tutorial
  4. 28 VBA Split Function When dealing with VBA Excel, the user may need to split a string into substrings according to a given delimiter. For instance, if given… 4 min VBA Tutorial

Chapter 7

Functions

  1. 29 VBA Functions VBA Functions. A function is a group of statements that together perform a task. Every C program has at least one function, which is… 4 min VBA Tutorial
  2. 30 VBA String Functions VBA String Functions. Excel users typically store information as strings. As a result, string functions have become highly significant. You may find the number… 4 min VBA Tutorial
  3. 31 VBA MsgBox VBA MsgBox. A MsgBox is nothing more than a dialog box that can be used to inform your users by displaying a custom message… 4 min VBA Tutorial
  4. 32 VBA InputBox The VBA InputBox prompts the user for values. The dialogue box displays a message and anticipates a response from the user in the form… 3 min VBA Tutorial
  5. 33 Excel VBA InStr Excel VBA InStr. The VBA InStr function is used to find out if a string is contained in another line of text and it… 3 min VBA Tutorial
  6. 34 Excel VBA InStr Function The InStr function locates a given substring inside the given string and returns the index of the first place of the substring. Unlike other… 3 min VBA Tutorial
  7. 35 How to Use MsgBox in VBA Excel's Visual Basic for Applications (VBA) provides a dialogue box called MsgBox that is useful for providing helpful information to your program's end users.… 3 min VBA Tutorial
  8. 36 VBA Date Format VBA Date Format. The Date Format function accepts a date expression as input and returns a string comprising the expression in the specified format.… 3 min VBA Tutorial
  9. 37 VBA Instr Function The InStr function finds the first place in the string where a given substring appears and returns that location. InStr is a VBA function,… 3 min VBA Tutorial
  10. 38 VBA LEFT Function The VBA LEFT Function helps to get the number of characters or substring only from the left side of the String or from the… 3 min VBA Tutorial
  11. 39 VBA LEN Function The VBA LEN function helps to get the length of a given string. The variant variable is seen as a string by the VBA… 3 min VBA Tutorial
  12. 40 VBA MID Function People often use the MID Function to get a substring out of a full-text string. It's considered a variable of the String type. The… 3 min VBA Tutorial
  13. 41 VBA Right Function The VBA RIGHT function derives characters from the right side of the text values you give it. Excel has a lot of text functions… 3 min VBA Tutorial
  14. 42 VBA TRIM Function Sometimes we download data from online servers, and the data needs to be in the correct order, or there are extra spaces in the… 3 min VBA Tutorial

Chapter 8

Errors & Debugging

  1. 43 Type Mismatch VBA VBA Type Mismatch Error in Excel is a "Run Time Error," and it is the number 13 error in this bracket. It can be… 3 min VBA Tutorial
  2. 44 VBA Error Handling VBA code is generally error-prone because even the most careful programmer can commit syntax or logic mistakes. Errors and mistakes are common because code… 5 min VBA Tutorial