A macro is a sequence of instructions that are executed using a specific command, such as a button press or a keyboard shortcut. Thanks to macros, the user can repeat a series of actions over and over again instantly. Its name comes from the term macroinstruction, since they are considered complex instructions that contain several small and simple instructions.
If you want to design your own macros in Excel, the fastest way is by recording actions. First, go to the View menu. Click on Macros.
In the pop-up menu, select the Record Macro option.
Record a new macroA pop-up window will appear immediately. There, you must assign a name to the macro and a keyboard shortcut composed of the Control key and a custom key. You should also indicate where you want to save it and write a description to make it easier to identify. After modifying these values, click OK.
New macro optionsMicrosoft Excel is now monitoring and recording all the actions you perform on the spreadsheet. It includes those related to formulas, cell contents, and cell formatting. When finished, return to the View menu, click on Macros, and click on Stop Recording.
Stop recording the macroNow, every time you run the macro, all the actions that have been recorded will be performed. For example, we have written MALAVIDA using the range of cells A1:A8. By using Control + M, the combination we have assigned, the 8 letters are automatically written in the same order and the same cells.
You can access all the macros you have created in the workbook from the Macros button by clicking View Macros.
View active macrosIn the pop-up window, all macros available in the workbook are listed. Using the Edit button, you will access the Visual Basic code editor for applications.
Existing macro optionsUse the Delete button to delete a macro. Keep in mind that by storing a macro inside the book, it remains there even when you share the file with other users.