+5 votes
68 views
in Office by (242k points)
reopened
Excel: create a macro - this is how it works

1 Answer

+3 votes
by (1.6m points)
 
Best answer

Activate macros in Excel
1st step:
2nd step:
3rd step:
4th step:
Use macros in Excel
1st step:
2nd step:
3rd step:
Brief instructions: Creating macros in Excel
Brief instructions: Using macros in Excel

Do you want to automate recurring instructions in Excel to save time? In the following article we will show you how to use macros..

image image

In software development, macros are sequences of instructions that have a specific designation (macro name) and automate a process. This saves time and can make work easier with large Excel files. They consist of a combination of key and mouse clicks that are recorded and saved. There are macros not only in Excel, but also in all other Office applications. In this article, however, we will go into more detail on the use in Excel.

Activate macros in Excel

Would you like to create macros, but haven't shown the developer tools as a tab yet? In this article, we will show you how to unlock the developer tools in Excel so that you can start creating the macros right afterwards .

Follow our step-by-step instructions or take a look at the brief instructions ..

1st step:

image
Click in your Excel workbook on top of the " Developer Tools " and then on " Record Macro ".

2nd step:

image
A new window opens in which you can enter the macro name and, optionally, a key combination . In our example we select " Macro_Seitenlayout " for the name and the key combination [Ctrl] + [s] . Spaces are not allowed. Click OK to confirm .

3rd step:

image
In our example we change the frame lines and record this process as a macro. This allows us to easily change the appearance of other tables in the document using the previously defined key combination. However, you can also record any other process in this way.

4th step:

image
When you have completed all the steps for your macro, click again on the " Developer Tools " and "there on the Stop Recording ".

Use macros in Excel

If you've assigned a keyboard shortcut to your macro, you can now easily run it using it. Otherwise, proceed as described in the following instructions.

Follow our step-by-step instructions or take a look at the brief instructions ..

1st step:

image
In the tab " Developer tools " click on " Macros " at the top left in the tab .

2nd step:

image
A new window opens with an overview of the macros you have created. Click on the desired macro and then click on " Execute ".

3rd step:

image
The macro we created in the instructions above has now been executed automatically and the table has automatically changed its appearance.

Brief instructions: Creating macros in Excel

  1. Open Excel and click the Developer tab .
  2. There click on " Record Macro ".
  3. Enter a name for the macro and, if required, a key combination . Click on " OK " to confirm .
  4. The recording is now in progress. Perform your desired sequence of commands . We have z. B. changed the appearance of the table.
  5. When you are done, click the " Developer Tools " "to stop recording ."

Brief instructions: Using macros in Excel

  1. Under the " Developer Tools " to " macro ".
  2. Select the desired macro and click " Run ".
  3. The macro is now automatically executed with the previously recorded command sequence .

...