Welcome to the ultimate Excel VBA Tutorial (Visual Basic for Applications)! You will walk the journey from being an VBA Zero to becoming an VBA Hero. This VBA tutorial is not aimed only at teaching you how to write VBA macros in Excel – it’s a general introduction to VBA. However, some sections as you will notice are indeed aimed at Excel (e.g. the Workbooks and Worksheets section).
Prefer learning from videos? Checkout my recommended VBA Video Tutorials
Visual Basic Editor Tutorial
How to Record Macros
How to Debug VBA
VBA Functions and Procedures
In order to process data you need to store it somewhere. In this tutorial you will learn how to use the VBA Dim statement to declare VBA Variables and all Data Types available in VBA (strings, numbers etc.).
VBA Conditions – If…Else
VBA Select Case
The VBA If statement is great for writing several conditions. In some cases, however, there is a need to enumerate many scenarios based on values of specific variables. The VBA Select Case statement saves a lot of time compared to VBA If.
Using VBA Loops: For, ForEach
Using VBA Loops: Do While, Do Until
VBA For loops allow you to run a loop for a specific amount of iterations. For cases when a loops needs to be run until a condition is met (Do Until) or needs to run while a condition is met (Do While), read the tutorial.
Excel VBA Range
Excel Cells Formatting
UserForms allow you to create you own pop-up windows for users to interact with, similar to Message Boxes.