All articles

KajoData / Excel

Is VBA worth learning? Choose automation for your actual work

I use a monthly report to explain how I assess VBA: choosing a task, building a small prototype, checking its output and handing it over.

Kajo RudzińskiPublished Updated 14 min read

A mechanical arm arranges spreadsheet tiles on a compact workbench.

Every month you open a similar file, move the same columns and arrange the same headings. Eventually you wonder whether to learn VBA. I would start with that particular task. Debating the future of a programming language can take longer than understanding the process on your desk. That process may also be considerably more interesting than another online argument about which technology has supposedly died.

VBA stands for Visual Basic for Applications and supports automation in Office applications. Microsoft’s introductory guide describes document objects and repetitive formatting among its applications. My question is practical: would learning it help you solve a problem you can actually work on? A useful answer depends on your environment, your responsibilities and the person who eventually receives the result.

Describe the work before naming a tool

Consider a synthetic scenario. Once a month you receive an order export. You need to check the required columns, prepare a regional summary and save a worksheet in an agreed layout. Before thinking about a macro, describe these as separate stages. Importing data, interpreting it and formatting a report involve different requirements. One button might eventually start them all, but you still need to understand each part.

I also write down what a finished result means. Does the report include orders placed during the month or orders paid during the month? Should cancelled items remain visible? Does one row represent an order or an individual product within it? Without these answers you can automate an incorrect summary very efficiently. The machine will repeat your mistake with impressive consistency, which is rarely the kind of reliability you were hoping for.

Only then do I mark the mechanical activities. Setting column widths is an obvious candidate for repetition. Deciding whether an unusual sales adjustment makes sense requires a business rule or a person’s judgement. If you bundle everything together as reporting, the learning scope becomes difficult to assess. Separating the activities gives you a clearer project and makes it easier to explain what the program is responsible for.

Find out where the workbook will be opened

The first boundary is straightforward. Excel for the web can open a workbook containing VBA, but cannot create, edit or run those macros. If everyone must complete the task in a browser, a desktop macro will not satisfy that execution requirement. Preserving code inside a file and executing that code are different capabilities.

Before learning, I therefore check the application, the computer and the handover process. Will the author prepare the result locally while others only read it? Must each recipient recalculate the workbook independently? Does the organisation permit macros for this use? These answers establish the actual scope. Knowing that colleagues have something called Excel does not tell you enough about their working environment.

I would avoid a first project that depends on five applications and several computers. Choose a contained local task with a visible input, output and owner. If a shared workflow becomes necessary later, you already have a useful description of the requirements. You can compare other approaches without feeling obliged to defend a macro just because you spent two weekends writing it. Time invested should teach you something, not trap you.

Separate data preparation from workbook control

If most of the work involves loading files, changing types and combining tables, I consider Power Query. Microsoft describes importing, transforming and refreshing data as its purpose. In our monthly report, that stage may be clearer as a sequence of transformations than as a long sequence of actions applied to worksheet cells. The choice should follow the work.

That is my selection principle, rather than a promise that Power Query covers every situation. Check the source and the capabilities of your particular application version. If a later step only changes some headings, I would avoid creating another import mechanism there. Keeping the preparation rules in one place makes it easier to explain where a number in the final report came from and which decisions affected it.

For this example I would keep the import description, the metric definitions and the final presentation as distinct responsibilities. I would consider VBA for the presentation stage and for tasks requiring workbook control. Tools can work together. What matters is that their boundaries remain understandable and that the data retains its meaning while moving between them. A convenient launch button should not hide incompatible definitions of the same measure.

When I would invest in learning VBA

Learning makes sense when you have a recurring desktop Office problem, permission to work on copies and somebody who will use the result. Preparing a consistent report layout is a reasonable starting point. Arranging a set of worksheets according to a clear instruction is another. Keep the scope small enough that you can describe the expected behaviour without opening the code. If you cannot explain it yet, simplify the task.

Reading an existing solution can also be valuable. When you inherit a workbook containing a macro, rebuilding the entire system should not be the first move. Find out what starts the code, which worksheets it uses and what it saves. This investigation helps you have a useful conversation with the person maintaining it. Memorising command names without understanding the surrounding process gives you much less practical control.

I would not present VBA as a promotion guarantee. In a portfolio, I want to understand the problem, your choices and your checks on the outcome. A macro can demonstrate that work if it addresses a real need. Explaining that you deliberately left one judgement to a person can show maturity. Automating every visible action simply to make the screen look impressive can have the opposite effect when somebody asks how the result is trusted.

Compare VBA with Office Scripts through requirements

Microsoft’s comparison distinguishes desktop VBA scenarios from the cross-platform, cloud-oriented role of Office Scripts, including integration with Power Automate. Before choosing, check availability for your account and organisation. Seeing a feature in somebody else’s tutorial does not establish that your environment offers the same option or supports the same workflow.

For a beginner, the execution environment matters more than a ranking of languages. If the task must run within a shared process, write that condition down from the beginning. If you are learning on a local workbook and need to understand inherited macros, the answer may be different. I would not move a project between technologies solely because one name sounds more current or appears more frequently in job advertisements.

My comparison starts with four questions: who starts the process, where the input lives, where the result is saved and who responds to an error. Then I match the tool to those answers. This avoids finishing a script and only afterwards discovering that the team must completely change its working practices to use it. The organisational cost of that change can matter more than the number of lines in the program.

Separate mechanisms handle a stream of data blocks and the layout of blank worksheet tiles.

Give the first prototype one visible job

Return to our order report. The first prototype only prepares headings and formatting in a copy of a worksheet. It does not delete files, send messages or update the source system. The expected effect is visible and can be compared with the input. That is how I would choose an introductory exercise: one clear problem at a time, with consequences that are straightforward to inspect and reverse.

Before starting, I prepare a sample of the expected result. I specify worksheet names, column order and cells that should remain untouched. Then I introduce a second input variation, perhaps an additional row. If the solution only understands one exact arrangement, I would rather discover that on a tiny sample. Success with a single carefully prepared file is the beginning of the assessment, not the end of it.

If you use an action recorder, treat its output as material to understand. Examine which elements it refers to and which assumptions it makes. Avoid trying to improve everything simultaneously. First identify one dependency on a position in the worksheet, then choose a single change. Learning becomes far more concrete when you can explain why the previous version no longer matched the input, instead of merely noticing that it failed.

What I want to understand in the code

At first I would focus on a few questions. How does the program identify the workbook and worksheet? What does it treat as the end of the data? Where does it make a decision, and what happens when a condition is false? Each question connects a programming concept with a concrete reporting risk. Variables, conditions and loops become tools for understanding the task rather than chapters to complete.

While reading a fragment, I try to explain its behaviour in ordinary language. If I cannot, I stop before adding more instructions. Understanding the broad purpose of a macro does not establish why it uses a particular worksheet. Copying additional code from the internet increases uncertainty in that situation. I prefer a small version I understand to an elaborate one whose every change requires guessing.

I take the same approach with AI assistance. I ask for assumptions and dependencies on the file structure, then compare the explanation with my own process description. A convincing answer does not establish that the program fits the input. I remain responsible for deciding what may change, what output is expected and how failure will be recognised. Generating code does not transfer those decisions to the generation tool.

Recognise when the project has grown

One warning sign is adding exceptions without updating the process description. One recipient wants a different column layout, another a separate period and a third an additional file. Each request sounds small, but together they create a different task. I would stop and agree the scope again. A solution is difficult to maintain when its actual requirements exist only in a sequence of messages from users.

Another sign is losing the ability to check a change calmly. If editing one heading requires inspecting every stage, responsibilities may be too tightly connected. I would consider splitting the task or choosing a simpler approach. That decision does not invalidate learning VBA. It shows you are starting to assess a tool through maintenance costs rather than pride in the number of instructions you have written.

Setting a completion condition helps. For example, another person should prepare the report from two different samples and identify the source of each control value. Once that works, the first stage is complete. I save new ideas for later instead of polishing the same button indefinitely. The project should produce a useful result and reveal the next skill you need, while leaving room for other work and learning.

Plan data checks before the run

A button saying Done should not be the only evidence of success. For this synthetic report I would want to see the input row count, the reporting period and a control total before the formatting stage. Afterwards I compare those facts with the output. Formatting should not change the number of orders on the way through. It is a simple expectation, but an exciting automation demonstration can make it surprisingly easy to overlook.

I describe exceptional situations separately. A missing required column might mean stopping with a clear explanation. An empty export could be correct for a period with no activity, or it could signal a source problem. The program does not know the difference until somebody defines it. Your list of exceptions should therefore come from the process, rather than only from the error messages you happened to encounter while learning.

Repeated execution deserves attention too. Will a second run append another summary or replace the previous one? Can the user recognise the current output? Can you trace it back to its input? Your first project does not have to anticipate every imaginable situation. It should explicitly handle the situations most likely to happen tomorrow morning. Predictable behaviour is more useful than a long list of ambitious features that nobody can confidently explain.

A hidden worksheet does not establish access control

The earlier version of this article described worksheet protection as managing security. That needs correcting. Microsoft explicitly states that worksheet protection restricts changes to locked cells and is not a security feature. I therefore do not treat a hidden tab or a workbook button as protection for confidential information. The distinction matters even in a very small project.

Information a recipient should not receive must stay out of the delivered file, regardless of whether it is immediately visible. I use synthetic data for exercises and follow the agreed document-sharing process at work. Learning VBA does not create a reason to bypass organisational rules or change computer security settings. Defining the boundary of an exercise helps you concentrate on the actual programming problem without introducing unrelated responsibilities.

I am equally careful about performance claims. Adding code does not establish that a report becomes faster or easier to scale. Assess the whole process. If a button saves a minute but every input change requires an hour of repair, the balance deserves an honest discussion. There is no need to turn a modest convenience into a heroic automation story. A small improvement can be worthwhile when its costs are visible.

Count maintenance as part of the investment

Before handing over a solution, I would ask another person to follow the instructions without my help. Do they know where to put the input file? Can they recognise a failure? Do they understand the report date? Those questions quickly reveal assumptions the author considered obvious. The workbook should help its recipient complete a task without requiring them to remember a conversation from a month earlier.

I would provide a short instruction covering the scope and limitations, together with a manual way of preparing the result if the automation fails. The fallback may be less convenient, but it helps preserve continuity. A future maintainer should know which elements can change freely and which need checking again. Naming the process owner is as practical as naming a variable, even if it looks less impressive in a tutorial.

When deciding whether learning is worthwhile, I consider frequency, input stability and time spent on corrections. A recurring report with a stable structure can be a good practice ground. A one-off workbook nobody will open again often calls for a simpler approach. That is an ordinary engineering decision. Every task does not need its own miniature application, release process and explanation of how to keep it alive after the author has moved on.

Build a learning plan around a result

I would divide the beginning into three small goals. First, organise the worksheet itself: a clear table, explicit data types and understandable calculations. Then learn basic programming concepts through one contained task. Finally, prepare a version somebody else can run and assess. Each stage should produce something observable, instead of ending only with another hour of watched course material and a growing collection of bookmarks.

The guide to learning Excel from a table to a report can help with the first stage. If your problem is mainly about storing and selecting data, also consider SELECT in SQL. You do not need to study everything simultaneously. The point is to recognise which skill removes the current obstacle and which topic can wait until there is a practical reason to use it.

For your exercise, choose an activity you already know how to perform correctly by hand. Describe the input, the expected result and three failure cases. Decide where it must run and who will take it over. If VBA still fits after that exercise, you have a solid reason to learn it. You also have a much stronger starting point than asking whether the internet has finished declaring the language obsolete.

Key takeaways

Does VBA run in Excel in a browser?

Excel for the web preserves macros in a workbook, but cannot create, edit or run them. Working with VBA requires the desktop application.

Do I need to learn Python before VBA?

No. Start with Excel basics and a small task. You can learn variables, conditions and loops while studying VBA if it fits your environment.

Will a macro always make reporting faster?

There is no guarantee. Assess the whole process, including data checks, troubleshooting and ongoing maintenance.

AI was used in an automated way while working on this article. If you want to learn how to do it too, check out this project.

Kajo Rudziński

Newsletter KajoData

Let’s keep in touch.

I write about data analysis, learning and changing careers. My newsletter and the sign-up form are in Polish. If that works for you, I’d be glad to see you there.