MS Office

Macros in Excel – this is how they work

Macros in Excel - this is how they work

You can use macros in Excel to automate recurring processes and thus save time and nerves.

Spreadsheet with macros in Excel

To run macros, they must be activated. The first step in Office 2021 is to open the “File” tab, then click “Options” and “Customize the Ribbon”. Now select the main tabs and check the box next to “Developer”. Confirm everything with “OK”.

  1. Alternatively, open the option with the key combination (ALT)+(F8). Now you can insert macros and make spreadsheets with them. To do this, click on the Macros menu and then select “Record Macros”.
  2. Enter a macro name, a keyboard shortcut (for example Ctrl+R) to run the macro later, and optionally a description so you know later what the macro does in your document. Confirm everything by clicking “OK”.
  3. In the bottom bar you will now find a button next to “Ready”. If you move the mouse pointer over this area, the text “A macro is currently being recorded” appears. Now make the desired settings in the document.
  4. When you're done, click the button below to save the macro. If you run it with the previously defined key combination, it will automatically start implementing the saved settings.
  5. With macros, processes can now be started with a single mouse click or keystroke, saving you time when carrying out complex calculations, data comparisons or data analyses.

Example of an Excel macro

To adjust the page margins of a Word document, follow these instructions:

  1. First select a suitable key combination in the macro settings and start the macro recording.
  2. Then go to “Page Layout” and then “Page Margins” and then “Custom Page Margins.” Everything you change in the settings will be recorded.
  3. Clicking on the button saves the macro. Enter the key combination or click on “Show macros” and then click on “Run” to start the macro.
  4. Macros are particularly useful for frequently used processes such as importing data, creating diagrams or generating reports, thereby increasing efficiency.
About author

As a tech enthusiast and writer for votoh.com, I focus on providing practical solutions for common issues related to iOS, Android, Windows, macOS, Office, Smart TVs, software, games, and hardware. With a passion for simplifying technology, I aim to make complex topics accessible to everyone, offering tips and troubleshooting advice to help users navigate the digital world with ease.