Launched in 1987, Excel is the most popular spreadsheet program. However, despite the power and diversity of the tools it offers, users sometimes wish to find a simpler way of carrying out a series of mundane, repetitive tasks, or to perform an operation that the user interface cannot handle directly.

In 1992, Microsoft added Excel 4.0 macros, or XLM macros: users could add commands directly to cells, and these commands were then executed to perform a series of operations.

These XLM macros were very quickly replaced by VBA macros when Excel 5.0 was released in 1993.

VBA, or Visual Basic for Applications, is the programming language included in Microsoft Office applications such as Word, Excel, PowerPoint, Access and Outlook, as well as in a few products from other suppliers such as Corel Draw and AutoCAD. It is used to automate processes and workflows in the files of these applications.

Learning VBA has a number of benefits, including:

Automate recurring processes and boost productivity

Does your day-to-day work involve repetitive processes that you carry out manually every day?

Here's just one example: you regularly import data into an Excel spreadsheet, filter it, run calculations in the spreadsheet, apply a specific layout, then save the results in a PDF and email the file to your team or manager.

After a while, you're probably so familiar with the process that you can complete it in no time at all ... But what if you could do all this in just a few moments, at the click of a button?

The VBA language allows you to automate this process, saving you precious time that you can devote to other more rewarding and equally urgent tasks!

Creating new functions

The VBA language also allows you to create custom functions to add to the list of native Excel functions.

Creating your own function is particularly useful if you regularly perform the same type of calculation, which is not possible with a single standard Excel function and which sometimes requires a long and complex formula, with several levels of nesting.

The different stages of a calculation can be coded using the VBA language in a custom function.

You then no longer need to copy, paste and adapt your formula from one file to another, or build it from scratch each time. All you have to do is insert your custom function into a formula, and, just like an Excel built-in function, provide it with the values of its arguments: the code stored in your VBA function will do all the processing, and return the result!

Interact with other applications

Procedures created in VBA not only allow you to automate operations that run in Excel, but also to control other programs: sending an email, creating a Word document or a PowerPoint presentation, for example.

What's more, familiarising yourself with the Excel VBA language will make it easier for you to learn Access VBA or Word VBA to automate processes directly in these applications.

In fact, the basics of the VBA language are the same, whatever the application, the difference lies in the elements (or objects) that you will manipulate in your procedures to automate tasks.

Excel objects include spreadsheets, cell ranges, files, embedded charts, chart sheets, pivot tables and the application itself. These objects are organised in a hierarchy called the object model, and the principle is the same in Access or Word, for example.

Learning to analyse, design and improve processes

There's another thing you'll probably learn at the same time as programming: how to analyse processes!

To automate a process, you first need to understand it:

  • What is its starting point?

  • What are the inputs, for example, existing files and documents, values entered by the user, data in external systems?

  • What results should the process produce? This could be files again, records in a database, an e-mail...

Researching and analysing the inputs and outputs of a process and determining what needs to happen in between to transform inputs into outputs will develop your analytical skills.

Very often, and often in collaboration with your colleagues, you will also need to understand an existing manual process. Why are things done the way they are now? Is it something your automation needs to replicate, or is there a more efficient way?

All of this will give you a much more detailed insight into what's going on in your business or department. Over time, you'll also get better at gathering, understanding and using this information. These skills will be invaluable to your team!

In conclusion

Programming is certainly not for everyone, and interacting with the development environment to write computer code can be a frustrating experience when you're just starting out, but if you perform repetitive tasks in your Excel spreadsheets, you should give it a try!

VBA is much less complex than other programming languages, and many of the terms used in the code are very similar to the names of commands visible from the Excel interface, so are familiar to users, making it very accessible to non-computer specialists.

What's more, it's very gratifying to see your code working as expected, making your day-to-day tasks and those of your colleagues much easier!

If you want to automate tasks that are tedious and repetitive, and if learning to code doesn't scare you, our VBA training courses will take your Excel skills to a whole new level!