Tools

How to create macros in Excel step by step in a simple way

Macros are actions or tasks that under a series of specifications can help to perform tasks within cells automatically, such as creating dynamic tables , calendars, elements that must be repetitive in the same Excel file .

It is very important when we need to keep an automatic account of high amounts or share this file in Drive and be able to use it to keep accounts of a business with a partner by creating repetitive tables on several sheets of the same document if you have to perform the manual action each time.

insert macro excel

How to create macros in Excel?

  1. We enter our Excel program from our computer. If you don’t have this program, you can install Excel from its official website.
  2. We select a new blank file to start this guide.
  3. We have to visualize the “Developer” tab in the menu above, if for those coincidences they do not see it active, they must enter “File” and then the option “Options”, “Customize ribbon” and click the “Developer” button. so that it is visible.
  4. To begin, we will click on «Record macro» and then a new window will appear where we can change the name of the macro that we will create, select where we will save it and a description of what this macro is intended to do automatically.
  5. Within this window there is also the shortcut option, this will allow us that with our keyboard and a shortcut we can make the option quickly. It allows us to use CTRL + the key that we consider necessary to carry out the option.
  6. We can start the recording, we will create the desired text in each cell, for example; a table of activities placing the days and activities creating a table of the same, at the end of the action we must stop the action and it has been recorded.

create macro in excel

How to use macros in Excel?

  1. To begin we must take into account and remember with what abbreviation we save our previous macro.
  2. In a new Excel document we will start by creating the macro, with the abbreviations you will see that what we recorded previously is repeated in our new document as we do it.
  3. Important: When we press the macro with its abbreviations again, we will see that it is located in the same place as from where we initially recorded, so even if we place our selection of cells in another place and activate the macro, it will return to its starting place.
  4. To prevent this from happening, we will re-record our macro, this time activating the “Use relative references” option and recording again the same previous macro but with this option active.
  5. We create a new document to test that this time the macro can be ported effectively.
  6. We try again with the abbreviations and in an excellent way copies this macro to the place we want the action to be executed.
  7. Important: When we record macros we must consider the spaces around a table, for example, if they have left two spaces from the top and one from the side, when we carry out the action with the abbreviations we find that it considers and places this table on those spaces.

In this way, step by step you learned to make macros and that this tool can be useful in cases where you need to repeat writings, titles or create and apply a custom table style in Excel.

Excel is endless tools within the same program, on this site we provide you with a lot of information about its utilities such as rounding a number in Excel step by step.

Leave a Reply

Your email address will not be published.

Back to top button