How to record a macro in Excel? Step-by-step instruction.

Activating and disabling macros in the Developer tab

See also: “How to fix a table title in Excel”

It’s worth noting right away that some users may encounter difficulties in performing this task. This is due to the fact that the “Developer” tab is disabled by default and, first, needs to be activated.

  1. Left-click on the “File” menu.

  2. Then, at the bottom of the drop-down list, select “Options”.
  3. In the program parameters, we are interested in the “Customize Ribbon” item. Next, check the box next to the “Developer” tab. Now we confirm the action by pressing the “OK” button.

Once these steps are completed, the Developer tab will be activated. Now you can start enabling macros.

  1. Click on the “Developer” tab. In the left corner there will be the required section, where we click the “Macro Security” button in the form of an exclamation mark.
  2. In the settings window that appears, you can activate all macros at once. To do this, you need to select the “Enable all macros” option from all the proposed options. By pressing the “OK” button we confirm the changes made and exit the parameters.

    However, you should pay attention to the fact that Microsoft developers do not recommend choosing this option, as there is a possibility of running a dangerous program that can harm your computer. Therefore, when performing this operation, remember that you act at your own peril and risk.

Macros are deactivated in the same dialog box. However, when turned off, the user will be offered three options with varying degrees of security.

As the name suggests, in the lowest version all macros that have a digital signature will work properly. And in the first two options they will be completely disabled. After we have made our selection, click the “OK” button.

What is a macro in Excel 2007?

For now, we will learn how to record simple macros. It's very easy to do. In the “Feed” we now have the corresponding “Developer” icons:

In this mode, other functions will be available to us - “designer mode”. You can create windows and buttons yourself. And in the Visual Basic editor you can edit created macros. So, I'll show you how it all works. When you click the “Record Macro” button, you will first need to fill in its name (without spaces), call hot keys (optional) and the location where it will be saved:

Depending on the task at hand, you can save macros in a separate document or in a “personal workbook”. In the first case, it is written within the document and will only be executed within the document. In the second case, it can be called before creating the document. It’s better to demonstrate clearly why macros are needed. Task: I need to create: an Excel document, in the document create a table of a certain format and calculations inside. Let's watch the video of what happened:

You yourself have seen that the process of creating one simple demo table takes five or more minutes. And with a macro command we created a table in 2 seconds. What if we are talking about complex projects? The answer is obvious: by creating a procedure once, you will save time and increase your productivity.

After finishing recording, when closing Excel, the program will definitely ask you to save the changes in the “Personal Book” of macros. Don't forget to agree; otherwise, the recorded macro will be lost and everything will have to be done again.

Important! The “personal workbook” of macros is stored in the user’s folder at the path C:\Users\%Computer User%\AppData\Roaming\Microsoft\Excel\XLSTART. This book can be shared with others or deleted if something doesn’t work out.

Our macro is now available via the “Macros” button, and you can run it from there.

Setting up macros in Program Options

  1. We go to the “File” menu and select the “Options” item in it - similar to the first item in the example discussed earlier.
  2. But now, instead of the ribbon settings, select the “Trust Center” section. On the right side of the window, click on the “Trust Center Settings…” button.
  3. As a result, the system will direct us to the window with macro settings, which also opened when performing the operation in the Developer tab. Next, select the option we need and click “OK”.

How to enable macros in Excel 2020 video

You can call macros for execution, as we already did in the previous example. This is not clear and sometimes not very convenient. Therefore, we will do it differently - we will create a button in the document with which we will clear the content.

Programming begins

Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]