How to Make Simple Macros in Excel

29 December 2021

Home » Blogs » Software » How to Make Simple Macros in Excel

If you’re working with Microsoft , you’re often doing repetitive work. Doing the same job repeatedly, of course, is very tedious and tiring if there are a lot of them.

To do this work, you can use the Macros in Microsoft . The will record all your actions from clicks and keyboard keystrokes. You can also edit the to suit your needs.

Showing Macro

and tools can be found on the Developer tab, which is hidden by default, so the first step is to enable them.

On the File tab, select Options > Customize Ribbon.

TOP TUTORIALS:  How to Sharing Printers in Windows 11, Windows 10, and Windows 7
record macro 01

Then you can find the Macro tool on the Developer tab.

record macro 02

Recording Macro

  1. On the Developer tab, click the “” button
record macro 03
  1. Then do the work you want to automate, such as setting cell formats, fonts and others.
  2. When finished, click the “Stop Recording” button
record macro 04

Creating a simple Macro to set cell format

In this sample macro, we will create a macro to give a border, set the font size and style.

  1. Create sample data in and select the data that you set the format for, for example as follows
record macro 05
  1. Then you click the “” button. In the window that appears, you can give the name of the Macro that you created and can also add a Shortcut for easy access . You need to pay attention when creating shortcuts, do not use shortcuts that have been used by Excel or . Click the “OK” button to start recording.
TOP TUTORIALS:  How to merge multiple Excel files into one file
record macro 06
  1. Do the work you are going to record. In this example we will create a border on the cell that we selected, then change the font size and style, and also set the number format.
record macro 07

Click the “Stop Recording” button, if you have finished doing the work and stop the recording process from the macro.

  1. To edit and view the Macros that you have created, you can do so by clicking the “Macros” button and then selecting the macros in the list. Then click the “Edit” button to make the necessary changes or view the generated code.
TOP TUTORIALS:  Changing the Location of the Windows 11 Taskbar
record macro 08

You can make changes to the code that is formed according to your needs.

record macro 09
  1. To run the macro that we have created, select the cells that you want to format. Then open Macro and click “Run” to run the macro.
record macro 10
  1. To save an Excel file with Macros, you must save it in the “. xlsm ”
record macro 11

Thank you for visiting Bardimin. Thank you…..