How to Make Macro in Excel: A Step-by-Step Guide for Beginners

how to make macro in excel

Creating a macro in Excel allows you to automate repetitive tasks. This can save you a ton of time and reduce errors. To create a macro, you will use the "Record Macro" feature in Excel to capture the sequence of actions you want to automate. By the end of this article, you’ll know how to set up, record, and run your own macro.

Step-by-Step Tutorial on How to Make Macro in Excel

Here, you’ll learn the steps to create and use a macro in Excel. Follow these steps, and you’ll be automating tasks in no time!

Step 1: Open Excel

Open the Excel application on your computer.

Make sure you have the Excel file you want to work on ready. If you’re starting from scratch, you can create a new workbook.

Step 2: Go to the "View" Tab

In the upper menu, click on the "View" tab.

This is where you’ll find the "Macros" group. The "View" tab is usually located between the "Formulas" and "Review" tabs.

Step 3: Click on "Record Macro"

In the "Macros" group, click the "Record Macro" button.

A dialog box will appear, allowing you to name your macro and assign a shortcut key if desired. You can also choose where to store the macro: in the current workbook or in your personal macro workbook.

Step 4: Name Your Macro

Enter a name for your macro in the dialog box.

Choose a name that describes the task it will perform. This will make it easier to find and use later. Avoid spaces and special characters in the name.

Step 5: Perform the Actions You Want to Automate

Carry out the tasks you want your macro to record.

Excel will record every action, including cell selections, data entry, and formatting changes. Be precise, as the macro will replicate exactly what you do.

Step 6: Stop Recording

Once you’ve completed the actions, return to the "View" tab and click "Stop Recording."

This saves your macro. You can now run it anytime to perform the same set of actions automatically.

After completing these steps, your Excel macro is ready to use. Running the macro will perform the recorded actions, saving you time and effort.

Tips for Making Macro in Excel

  • Make sure your actions are precise while recording, as the macro will repeat everything you do.
  • Use descriptive names for your macros to easily identify their purpose.
  • Test your macro on a sample file first to ensure it performs as expected.
  • Use relative references if you want the macro to work on different cells each time.
  • Save a backup of your workbook before running a macro, just in case something goes wrong.

Frequently Asked Questions About Making Macro in Excel

What is a macro in Excel?

A macro is a set of instructions that can automate repetitive tasks in Excel.

How do I edit a macro after recording it?

You can edit a macro using the Visual Basic for Applications (VBA) editor in Excel.

Can I assign a keyboard shortcut to my macro?

Yes, you can assign a shortcut when you’re naming your macro during the recording process.

Do macros work in all versions of Excel?

Most features of macros work across different versions of Excel, but some advanced features may not be compatible with older versions.

Is it safe to use macros in Excel?

Macros are generally safe, but be cautious about running macros from unknown sources as they can contain harmful code.


  1. Open Excel.
  2. Go to the "View" tab.
  3. Click on "Record Macro."
  4. Name your macro.
  5. Perform the actions you want to automate.
  6. Stop recording.


There you have it! You now know how to make a macro in Excel. Automating tasks with macros can save you loads of time and minimize errors in your work. Remember, practice makes perfect—so don’t be afraid to experiment with different macros to see how they can benefit you. If you want to dive deeper, plenty of online courses and tutorials can help you master Excel macros. Happy automating!

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy