1. Introduction to the development environment
Before writing automation code, the editor and supporting tools need to be configured for efficient work in Excel. Participants learn macro recording, the layout of the VBA editor, code color meanings, shortcuts, code transfer and archiving, and tools that help correct code.
- adjusting the tool for working with VBA,
- recording macros,
- structure of the VBA editor window – toolbars,
- meaning of colors in the code,
- archiving and transferring code,
- the most important keyboard shortcuts,
- working with development tools that facilitate code correction.
2. Basics of Visual Basic for Applications
VBA syntax and program structure are addressed through the elements needed to write and organize code correctly. The section covers constants, variables, procedures, functions, and scope, along with creating custom solutions and using built-in constants, functions, and procedures.
- constants,
- simple, array, and object variables,
- procedures,
- functions,
- scope of variables, procedures, and functions,
- creating your own, using built-in constants – functions and procedures.
3. Variables
Variables in VBA hold values, collections of values, or references to Excel elements used by the code. This part separates simple, array, and object variables, giving participants a clearer basis for writing procedures that process data and interact with workbook objects.
4. Conditional statements and loops
To control program flow in VBA, logic must be expressed through decisions and repetition. Participants use If statements, Select Case, and several loop types such as For, Do, While, and For Each, including situations where processing should stop early with Exit.
- conditional statements beginning with the keyword If,
- the Select Case selection statement,
- loops (For, Do, While, For Each and others),
- early termination of a loop (Exit).
5. Error handling
When macros process varied data and files, predictable reaction to failures becomes part of reliable automation. The material distinguishes key error types and shows how to present both default and custom error messages so users can identify issues and continue work safely.
- types of errors,
- displaying information about errors, both default and custom.
6. Importing data
Working with external sources is essential when reports rely on data gathered outside a single workbook. The section covers importing information from text files, other workbooks, the Web, and Access, with the exact scope adjusted as needed during the training.
- text files (optional),
- workbooks (optional),
- Web (optional),
- Access (optional).
7. Workbook objects and VBA – showing the possibilities of using automation. Example objects discussed during the course
Excel VBA works through objects that define the application structure and the data being manipulated. Participants work with Application, Workbook, Worksheet, Range, and Cells, while comparing ways to explore the object model and perform operations on cells and ranges with Range.
- application,
- workbook,
- worksheet,
- range,
- cells,
- different ways of learning objects,
- examples of using the most important Microsoft Excel object – the Range object (operations on cells and data ranges).
8. Automation of analytical processes and reporting
Analytical reporting in Excel often depends on repeatable transformations and clear presentation of results. This part focuses on conditional formatting, AutoFilter, pivot tables, and date/time functions as components of automated reports and recurring analysis processes.
- conditional formatting,
- autofilter,
- pivot tables,
- date/time functions.
9. Practical use of the acquired knowledge
By building a macro or a small application, participants turn course topics into working solutions for routine analytical tasks. Exercises may include sales reporting from text data, earnings analysis with pivot tables, product-based worksheet splits, loan comparison, and automated charts or pivots.
Training participants will have the opportunity to write a macro or an application that will automate the activities they perform daily. Optionally, the trainer will suggest exercise topics (the content of the tasks will be adapted to the needs and level of advancement of the Participants)
- preparation of a sales report, based on data from a text file on the basis of a template provided by the trainer,
- preparation of a statistical analysis of employees' earnings, based on a workbook, using a pivot table,
- division into separate worksheets of individual products, taking into account the region and category,
- creation of an application that compares bank loans and selects the best option for the client,
- creation of a macro (data – stock market quotes or investment funds), which in each workbook will create a chart of a specified or default number of quotes,
- use of automatic chart creation,
- use of automatic pivot table creation.
The program carried out in the first two days of the training coincides with the program of the training VBA in Excel Basic.
10. Training summary
The closing segment connects the programming foundations, object model, data import, control flow, error handling, and reporting techniques into one workflow. It also clarifies how these elements support day-to-day Excel automation and where participants can apply them after the course.