A macro in Microsoft Excel is a set of actions that are stored for later execution by using a specific button or shortcut. The full name of this feature is macroinstruction, although macro is used as an abbreviation. It is so-called because a macro is considered a large or complex set of small or simple instructions.
In Microsoft Excel, there are two ways to create macros. In reality, they are two complementary paths. First, by recording the actions. In this way, each step taken in the application, regardless of whether it is a change of formatting in a cell or the modification of a number, is recorded as the user performs it. On the other hand, it is possible to create macros using Visual Basic for Applications, a programming language that requires written input of commands. Of course, a macro that has been recorded can also be edited later by entering code.
One of the main purposes of a macro is to simplify repetitive tasks, whether it is entering content into a spreadsheet or formatting its appearance. They also stand out for being dynamic, since they let you introduce variables that modify their behavior based on the content of one or more cells. However, the most interesting thing is the association to a specific key combination. By simply pressing two keys, Control + [Custom Key], the user can execute the macro quickly.
Although they are well known in Microsoft Excel, a macro can also be created in other Microsoft Office applications. Word and Access support this type of sequential instructions, greatly simplifying the creation of documents or databases.