How to Create, Run and Modify Macros in Excel

The popular Microsoft office suite, Office, thanks to the programs it integrates by default, presents us with a huge number of functions . Either to work with text documents, when creating spreadsheets or multimedia presentations, among other things. For all this, it offers us applications such as Word, Excel or PowerPoint.

As surely many of you will know first-hand, these are programs that are often used daily in jobs of all kinds. For example, the case in which we want to focus on these same lines serves, Excel . This is a software solution that basically focuses on working with numerical data . For all this, it presents us with a user interface full of independent cells in order to facilitate the calculations with the data that we are entering.

Create, Run and Modify Macros in Excel

At the same time, the program puts at our disposal a huge number of functions, formulas and characteristics that are very helpful to us. And we must bear in mind that we are talking about a proposal suitable for both home users and large companies. Therefore, to work with this program that we are discussing, we have many ways to do it. To a large extent everything will depend on the knowledge of the same that we have, or the level of the project that we have in hand.

What are macros in Excel

We can start by filling in the aforementioned numerical data in their corresponding cells, accompanied by their formulas to obtain results. The truth is that the possibilities here are almost endless. All this will help us for all kinds of jobs such as keeping personal or company accounting, making our own invoices, etc. Of course, as we get some experience with the program , we will see that there are many tasks here that are somewhat repetitive.

This is becoming more and more common, especially as the project grows, which can be a significant waste of time. But even if necessary, the Microsoft program offers us a good solution for all this. This will be very helpful with those repetitive tasks that we comment on, we refer to macros. In fact, there are many programs, not just Excel, that have them.

It should be mentioned that a macro is actually a small program or set of instructions that we define ourselves. As you can imagine, the main purpose of all this is to automate certain routine and repetitive activities. In addition, creating these elements is not complicated at all, Excel itself takes care of it. In addition, they will allow us to save time, efforts, and increase the functionality of the project in which we work.

For those of you wondering, we will tell you that these elements, macros, are often used when filling in data repeatedly, replicating the composition of a certain number of cells or repetitive actions, etc. They also serve to assign formats to the different sheets or to organize certain contents of them.

Enable the Developer tab to create a macro

The first thing to know is that Excel macros are especially suitable for users who already have certain knowledge of the program . In other words, it is a function aimed especially at advanced users, so a priori we may find that we do not see the corresponding option. And is that the tab that allows us to access these functions is hidden by default. Therefore, in order to see it, the first thing we do is click on the program’s File menu, where we select Options.

Menú archivo Excel

Then, in the new window that appears, in the left panel we select Customize Ribbon. At this moment we will have the possibility to activate, in the right panel, the Developer box, which by default is deactivated.

Activar desarrollador

At that moment we will be able to see how a new tab called Developer has appeared in the toolbar, which is the one that interests us in this case. In fact this will be the one that gives way to the creation of our new macros .

How to create our own macros in Excel

Therefore, in order to record a new macro in Excel, the first thing we do is click on the Developer tab that has just appeared. From this new tab, on the right side of the toolbar, we find a button called Record Macro.

Botón grabar macro

Therefore, when clicking on it, a new window will appear, which is the one that helps us define this automation element that we are going to create. We are in front of a window from which we will have the possibility to configure the own macro of which we have spoken. Therefore, the first thing to do is assign it a representative name so that later we can locate it without problems. In the same way, we can give you a brief description where we explain what it does, as well as assign it a keyboard shortcut .

Ventana crear macro

Customize your macros in Excel to work better

Say that once we have defined those fields, by clicking on the Accept button, the macro as such will start recording. Therefore, at that precise moment we have to perform all the tasks that we want to automate so that they can be done by themselves in the future. In this way, the program stores all this step by step, so we must be careful not to make mistakes. In that case we will only have to start over.

Once we have taken the steps that we want to automate, then we only have to stop the recording and save the Excel macro .

Detener macro

In case we want to take a look at all the elements of this type that we have created over time, it is easy. In addition to that, in addition to the combination of keys, we can also execute them from here. To do this, we only have to access the Developer tab again and click on the Macros button.

Ver macros excel

From this new window we will have the possibility to execute the created macros, delete them, edit them, etc. It is only necessary to point out the one that interests us from the list and click the corresponding button of those that we have mentioned. To all this we can add the fact that we have a button called Step by step. It can be very useful because it allows us to execute the macro function based on the ones we defined at the beginning. This can help us detect the one that is giving us problems or is incorrect, if necessary, which will give us the opportunity to modify it.