Macros are a powerful tool that can be used to automate tasks in Microsoft Excel. Macros can be used to create custom formulas, to change the behavior of formulas, and to save and recall formulas. To use macros in Microsoft Excel, you first need to create a macro file. To create a macro file, open the Microsoft Excel application and click on the Macro button on the toolbar. Then, type the name of your macro into the Macro Name field and click on the OK button. Next, you need to set up your macros. To do this, open the Microsoft Excel application and click on the Tools button on the toolbar. Then, click on Macro Settings. In Macro Settings, you will find three tabs: General tab; Formulas tab; and Recalculate tab. The General tab contains settings for your macros: how they are run (by default), where they are stored (in your workbook or in a separate file), and how often they are run (once per day or every day). The Formulas tab contains settings for how your macros work: what data is entered into them (for example, cells with values greater than 1 or cells with values less than 0), how data is rescaled when it is entered into them (for example, if data is entered into a cell that has a value of 1 but is displayed as 0 in another cell), and how formulas are generated (for example, if data is entered into a cell that has a value of 100 but is displayed as 10 in another cell). The Recalculate tab contains settings for how you want Excel to recalculate values when you make changes to your macros: whether you want it to recalculate all values in an equation or just some values; whether you want it to recalculate values after each time they are run or only after a certain number of times; and whether you want Excel to automatically determine whether there have been any changes since your last macro
Using Microsoft Excel macros, you can run a prerecorded set of steps to automate many of your repetitive tasks. You’ll have to turn on the feature before you can use it. We’ll show you how to activate macros on a per-spreadsheet basis as well as for all spreadsheets in Excel.
Be Smart When Enabling Macros
Enabling macros is not always safe and you should only use them when you’re sure of the source of your spreadsheets. Good macros save you time by automating your tasks, but there are bad macros that can harm your machine.
For example, if you’ve got your spreadsheet from an unknown source, you shouldn’t trust it to run any macros as you aren’t sure what it will end up doing. However, if you know the sender and you trust them, then it should be okay to allow your spreadsheets to execute macros.
How to Turn On Macros for a Specific Excel Spreadsheet
To enable macros in a specific spreadsheet and not all spreadsheets, then first, open your spreadsheet with Microsoft Excel.
When your macro-enabled spreadsheet opens, Excel will display a message at the top of the spreadsheet content. To allow this file to run macros, then next to the message, click “Enable Content.”
Excel will allow the current file to execute its macros, and you’re all set.
RELATED: How to Disable the Security Warning Message Bar in Microsoft Office Programs
How to Enable Macros for All Excel Spreadsheets
It’s not recommended to activate macros for all your spreadsheets, but if you’re sure you’ll only open safe and trusted files, then you can turn on the option as follows.
Activate Macros in Excel on Windows
If you’re a Windows user, first, launch Microsoft Excel on your PC.
In Excel’s left sidebar, click “Options.” If you’re on a spreadsheet screen, then choose File > Options instead.
On the “Excel Options” window, in the left sidebar, click “Trust Center.”
On the right pane, click the “Trust Center Settings” button.
You’ll see a “Trust Center” window. In the left sidebar of this window, click “Macro Settings.”
On the right pane, activate the “Enable VBA Macros (Not Recommended; Potentially Dangerous Code Can Run)” option. Then select “OK” at the bottom.
Select “OK” at the bottom of the “Excel Options” window.
And that’s it. Excel will now allow any spreadsheet to run macros.
Activate Macros in Excel on Mac
To turn on Excel macros on your Mac, first, launch the Excel app.
In Excel, click Excel > Preferences > Security & Privacy. Then, turn on the “Enable All Macros (Not Recommended; Potentially Dangerous Code Can Run)” option.
You’re done.
And that’s how you allow your spreadsheets to run codes and automate your tedious tasks.
If you’d like to learn more about Excel macros, then check out our dedicated guide on the topic. It will walk you through the process of creating a macro with an example.
RELATED: Learn How to Use Excel Macros to Automate Tedious Tasks