Skip to content

Macros in Excel

    Macros in Excel / How to create Macros in Excel?

    If you want to automate your boring and repetitive tasks then Macros in excel comes as a powerful tool for automating repetitive tasks, enhancing productivity, and enabling more complex functionality. They are essentially a series of commands and actions that you can record and replay as needed.

    Here’s a basic guide to using macros in Excel:

    How to Enable Macros in Excel ? Enabling the Developer Tab

    Before you can create or use macros, you need to enable the Developer tab in Excel:

    Click on the “File” tab > Go to “Options” > In Options dialog box, click on “Customize Ribbon” > Check the box for “Developer” under the Main Tabs section. > click on “OK

    Currently we don’t have any Developer tab

    Macros in Excel

    Recording a Macro

    Go to the Developer tab > Click on Record Macro.

    In the Record Macro dialog box, enter:

    • Macro name: A name for your macro (no spaces allowed).
    • Shortcut key: (Optional) Assign a shortcut key to run the macro.
    • Store macro in: Choose where to store the macro (This Workbook, New Workbook, or Personal Macro Workbook).
    • Description: (Optional) Add a description of what the macro does.

    Click OK to start recording. Perform the actions you want to Automate. Once done, go back to the Developer tab and click Stop Recording.

    After performing required steps Click on Stop Recording

    Running a Macro

    Go to the Developer tab > Click on Macros > In the Macro dialog box > select the macro you want to run > Click Run.

    Before Running Macro (developed in above steps to perform sort operation on column “Customer Name”, Formatting Header Row, and including borders)

    Click on “Run” and your worksheet will be transformed by performing all the recorded actions by a simple click

    Saving a Workbook with Macros

    When you save a workbook that contains macros, save it as a Macro-Enabled Workbook:

    1. Go to File > Save As.
    2. In the Save as type dropdown, select Excel Macro-Enabled Workbook (*.xlsm).
    3. Click Save. in a new tab) in a new tab)

    Leave a Reply

    Your email address will not be published. Required fields are marked *