VBA Basics
Open the editor, write your first working macro, and understand every line of it.
Excel VBA lets you automate the reports and clean-up jobs you repeat every week. This track of 20 short courses takes you from your first recorded macro to code that other people can rely on. Each lesson explains one topic with code examples you can paste into the Visual Basic Editor and ends with a knowledge check.
Start with VBA Basics and VBA Range & Cells, then learn loops and logic, the macro recorder, worksheets and workbooks, and error handling and debugging. The intermediate courses cover UserForms, report automation with PDF export and Outlook, strings, dates, user-defined functions, charts, Excel Tables (ListObjects) and files and folders. The advanced courses cover arrays and performance, the Dictionary and Collection objects, PivotTables in code, ADO and SQL queries, web APIs and JSON, and class modules. The track suits analysts, accountants and controllers who spend hours on manual Excel work and want to automate it, and developers who need to maintain existing macros.
Open the editor, write your first working macro, and understand every line of it.
Point your code at exactly the right cells and read or write them without ever clicking.
Make your macros decide for themselves and repeat work across thousands of rows.
Record what Excel does, read the code it produces, and rewrite it into something fast and reliable.
Point your code at the right sheet and the right file, every single time.
Find out what your macro is really doing, and fail gracefully when something goes wrong.
Build proper data-entry windows so people stop typing straight into your spreadsheet.
Let Excel react on its own, gather data from a folder, and send the finished report out the door.
Pull a whole range into memory, do the work there, and write it back in a single line — hundreds of times faster.
Group, count and de-duplicate thousands of rows in one pass using keys instead of nested loops.
Cut, search, split, join and reshape messy text until it looks like clean data.
Build, compare, shift and format dates reliably — including the text ones that arrived from somebody else's system.
Write your own worksheet functions in VBA and use them in cells just like SUM or VLOOKUP.
Build, fill, filter and refresh PivotTables entirely in code, so a monthly report becomes one click.
Create, format and export Excel charts from code so every report looks identical every month.
Stop guessing where your data ends — drive real Excel Tables from VBA and let them resize themselves.
Let your macros walk through folders, read and write text files, and swallow a hundred CSV exports into one sheet.
Pull exactly the rows you need out of closed workbooks, Access files and SQL Server — without opening a thing.
Call a web service from a macro, survive the things that go wrong, and get the answer onto a sheet.
Build your own objects, then use them to turn a thousand-line macro into something you can still read next year.
Yes, to run the code. VBA works in the desktop versions of Excel for Windows and, with some limits, for Mac. It does not run in Excel for the web or Google Sheets.
The basics, from the editor to loops and ranges, take a few evenings. Most people can automate a real report after the first five or six courses of the track.
Yes, if your work happens in desktop Excel. Millions of workbooks run on VBA, and it is still the quickest way to automate a task inside Excel itself. Office Scripts and Python cover other cases.
Free lessons work without an account. Sign up to save your progress.