How to Make Simple Macros in Excel

If you’re working with Microsoft Excel, 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 Excel. The macro will record all your actions from mouse clicks and keyboard keystrokes. You can also edit the macro to suit your needs.

Showing Macro

Macro and VBA 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.

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 “Record Macro” 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 Excel and select the data that you set the format for, for example as follows
TOP TUTORIALS:  [Standar] Color Order of RJ45 LAN Cables
record macro 05
  1. Then you click the “Record Macro” 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 Windows. Click the “OK” button to start recording.
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 VBA code.
TOP TUTORIALS:  Export each Sheet to PDF file in Excel by Using VBA Macros
record macro 08

You can make changes to the VBA 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…..

Ads Blocker Image Powered by Code Help Pro
Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

I Have Disabled The AdBlock, Reload Now
Powered By
CHP Adblock Detector Plugin | Codehelppro