Macros Creation Steps in Excel
Macros Creation Steps in Excel
• Excel Macro is a record and playback tool that simply records your
Excel steps and the macro will play it back as many times as you want.
VBA Macros save time as they automate repetitive tasks. It is a piece
of programming code that runs in an Excel environment but you don’t
need to be a coder to program macros. Though, you need basic
knowledge of VBA to make advanced modifications in the macro.
Why are Excel Macros Used in Excel?
• There are certain things that we do on a daily basis, every working day.
• If there were some magical way of pressing a single button and all of our routine tasks
are done?
• Macro in Excel helps you to achieve that. In a layman’s language, a macro is defined as
a recording of your routine steps in Excel that you can replay using a single button.
• For example, you are working as a cashier for a water utility company. Some of the
customers pay through the bank and at the end of the day, you are required to
download the data from the bank and format it in a manner that meets your business
requirements.
• You can import the data into Excel and format. The following day you will be required
to perform the same ritual. It will soon become boring and tedious. Macros solve such
problems by automating such routine tasks.
Recording A Macro
You can use a macro to record the steps of:
• Importing the data
• Formatting it to meet your business reporting requirements.
What is VBA in a Layman’s Language?
• Macros are one of the developer features. By default, the tab for developers is
not displayed in Excel. You will need to display it via customize report
• Excel Macros can be used to compromise your system by attackers. By default,
they are disabled in Excel. If you need to run macros, you will need to enable
running macros and only run macros that you know come from a trusted source
• If you want to save Excel macros, then you must save your workbook in a macro-
enabled format *.xlsm
• The macro name should not contain any spaces.
• Always fill in the description of the macro when creating one. This will help you
and others to understand what the macro is doing.
Step by Step Example of Recording Macros in Excel
• We will work with the following CSV file to write macros in Excel.
• We will create a macro enabled template that will import the above
data and format it to meet our business reporting requirements.
Enable Developer Option
• Go to the local drive where you have stored the CSV file
• Select the CSV file
• Click on Import button
You will get the following wizard
Click on Next button after following the above steps
Follow the above steps and click on next button
• Select ImportBankReceipts
• Highlights the description of your macro
• Click on Run button
You will get the following data