What You Need to Know First
Macros in Excel are automated instructions that perform repetitive tasks. When you open a file with macros, Excel blocks them by default for security reasons. You need to manually enable macros to use them.
The good news is this takes about 30 seconds once you know where to look.
Why Excel Disables Macros by Default
Microsoft blocks macros automatically because malicious code can hide inside them. By default, this protects your computer. You only need to enable macros for files you trust.
Never enable macros in files from unknown sources.
How to Enable Macros in Excel: Step by Step

For Windows Users
Step 1: Open Your Excel File
Open the workbook that contains macros. You’ll see a yellow security warning banner below the ribbon.
Step 2: Click “Enable Content”
Look for the yellow bar at the top of the spreadsheet. Click the “Enable Content” button on the right side of that bar.
That’s it. Macros are now active for this file.
If you don’t see the warning:
Your file might already have macros enabled, or it doesn’t contain any macros at all. Check the Developer tab to confirm macros exist.
For Mac Users
Step 1: Open Your Excel File
Launch the workbook with macros. A security notice will appear.
Step 2: Review the Notification
Mac shows a message about potentially harmful content. Click the notification or check your security settings.
Step 3: Allow Macros
In the security dialog, select “Enable” or “Always Trust” depending on your Mac OS version.
Changing Your Default Macro Settings in Excel
If you want to manage how Excel handles macros going forward, you can change your settings.
Windows Instructions
Open Trust Center Settings:
- Click File in the top left
- Select Options
- Click Trust Center on the left side
- Click Trust Center Settings
- Select Macro Settings from the left menu
Choose Your Security Level:
Disable All Macros Without Notification: Macros never run. You won’t see any warnings.
Disable All Macros With Notification: This is the default. You see the warning banner and can choose to enable them.
Disable All Macros Except Digitally Signed Macros: Only macros with trusted digital signatures work.
Enable All Macros: All macros run automatically. Not recommended unless you only open files you created.
Most people keep the default setting (disable with notification). It gives you control while staying safe.
Mac Instructions
Find Your Preferences:
- Click Excel in the menu bar
- Select Preferences
- Click Security
- Choose your macro setting
Mac options are similar to Windows. The default protection is usually sufficient.
Macro Security: Trust Locations
Excel has another safety feature: trusted locations. Files in trusted folders bypass the macro warning.
Use this cautiously. Only trust folders where you store your own files.
How to Add a Trusted Location (Windows)
- Open File > Options > Trust Center > Trust Center Settings
- Click Trusted Locations
- Click Add New Location
- Browse to your folder and select it
- Check “Subfolders of this location are also trusted”
- Click OK
Now any Excel file in that folder will have macros enabled automatically.
How to Add a Trusted Location (Mac)
- Click Excel > Preferences > Security
- Look for Trusted Locations
- Click the plus button to add a new folder
- Select your folder and confirm
What Happens When You Enable Macros
Once macros are enabled, any automated code in the file runs. This could mean:
Automatic calculations that update instantly when you change data. Buttons that trigger specific actions. Data imports that fill your spreadsheet from other sources. Custom functions that perform specialized calculations.
The macro runs according to how it was programmed. If you don’t know what a macro does, ask the person who gave you the file before enabling it.
Enabling Macros in Excel Online (Microsoft 365)
Excel online handles macros differently than desktop Excel. Most macros don’t work in the browser version because online Excel doesn’t support all macro features.
If your file requires macros, download it to your computer and open it in desktop Excel instead.
To download a file from Excel online, click File > Download.
Why Your Macros Might Not Be Working
Issue: You clicked Enable but nothing happened
Reason: The macro might need to run manually, not automatically.
Solution: Look for a button labeled with the macro name. Click it to execute the code. Or check the Developer tab and look for a “Run” or “Macros” option.
Issue: The macro ran but produced unexpected results
Reason: Macros are sensitive to your file structure. If data is in different cells than the macro expects, it won’t work correctly.
Solution: Ask whoever created the macro for instructions on how to prepare your data.
Issue: Macros are greyed out and won’t enable
Reason: Your organization might have locked macro settings through group policy.
Solution: Contact your IT department. They control these restrictions.
Issue: You see a popup asking about digital signatures
Reason: The macro has a digital signature for verification.
Solution: Click Enable unless you don’t recognize the publisher name. Signed macros are generally safer.
Creating Your Own Safe Macro Setting
If you work with macros regularly, consider this balanced approach:
Use the default setting (disable with notification) for most files. When you receive a file, review it before enabling macros. Ask the sender what the macro does. Enable macros only after you’re confident about the file.
For files you create yourself, save them as macro enabled files (.xlsm) and keep them in a trusted location.
Never share a macro file unless you’ve tested it thoroughly and can explain what it does.
Macro File Formats Explained
Excel uses different file extensions based on whether macros are present:
| Format | Extension | Contains Macros | How to Save |
|---|---|---|---|
| Excel Workbook | .xlsx | No | Default save option |
| Excel Macro Enabled | .xlsm | Yes | File > Save As > Excel Macro Enabled Workbook |
| Excel Binary | .xlsb | Yes | File > Save As > Excel Binary Workbook |
| Excel 97-2003 | .xls | Yes | File > Save As > Excel 97-2003 Workbook |
When you receive a file with macros, it will be .xlsm or .xls format. Regular .xlsx files can’t contain executable macros.
Disabling Macros Again
If you enabled macros but no longer need them, you can turn them off.
Click File > Info. Look for any message about macros. Click “Disable Content” if you see it.
To change your default settings back to maximum security, return to Trust Center settings and select “Disable All Macros With Notification.”
Summary
Enabling macros in Excel requires you to click a single button on the warning banner when you open a file. For permanent settings changes, visit File > Options > Trust Center on Windows, or Excel > Preferences > Security on Mac.
Only enable macros in files you trust. If you’re unsure about a macro, ask the file creator what it does before enabling it. Excel’s default security settings protect you without blocking legitimate work.
Understanding these settings puts you in control. You can work with macros safely while maintaining security awareness.
Frequently Asked Questions
Can I enable macros for just one file without changing my default settings?
Yes. Click the “Enable Content” button on the warning banner. This enables macros only for that file while keeping your default settings unchanged.
What’s the difference between saving as .xlsm and .xlsx?
.xlsx files cannot contain executable macros, while .xlsm files can. When you save a file with macros, use .xlsm format or Excel will strip out the macro code.
Is it safe to enable macros?
It depends on the source. Macros from known colleagues or trusted organizations are generally safe. Never enable macros in files from unsolicited emails or unknown sources.
Why do some macros ask about digital signatures?
Digital signatures verify that the macro hasn’t been modified since it was created. This adds a layer of trust. You can usually click “Enable” for signed macros from recognized publishers.
Can I tell what a macro does before enabling it?
Yes, but you need some technical knowledge. Right click on the file > Properties > Details to see file info. For actual code, you need to open the Developer tab and view the VBA editor, which requires experience. When in doubt, ask the file creator.
