Foundations: What VBA Is & Coding with AI
Where VBA fits next to Excel formulas and Python, what it can automate, and how to write code by describing what you want to an AI assistant.
What can VBA do?
- Automate repetitive Excel tasks — formatting, copy-pasting, filtering, splitting, merging.
- Build custom logic and buttons, and link to other Office apps like Outlook.
- Run the same steps the same way every time, on demand.
Excel formula vs VBA
- Formulas calculate directly in cells, are beginner-friendly, and recalculate automatically.
- VBA automates tasks, adds buttons and message boxes, and is highly flexible — but takes more effort to write and debug.
- One is not better than the other — use formulas for quick calculations, VBA for repeatable automation.
VBA vs Python
- VBA is embedded in Excel, great for simple repetitive Office tasks, and familiar to Excel users.
- Python needs a separate install but scales to big data and AI; the language reads closer to English.
- Start with VBA here; a separate AI-Assisted Python for Beginners course covers the rest.
How coding has changed
Traditional way: problem → search StackOverflow → write code → solution. New way: problem → prompt AI → trial and error → solution.