Tech Tips Home
The Best Tech Tips And Daily Deals
Newsletter On The Internet!

Shop online 24hrs a day or call us Mon-Fri
8:30AM-4:30PM EST - 1-800-915-2088
WorldStart Tech Tip And Store Search
Email: Password: Login Remember Me

Like what you see here? Subscribe to the Tech Tips newsletter!   Email: Subscribe

Creating Macros in MS Excel

Wednesday, February 9th, 2011 by | Filed Under: MS Excel, MS Office Help
 
Loading...


Microsoft Excel is the one of the most popular spreadsheet programs used worldwide. It has a variety of features such as data storage, creating reports and charts, using mathematical functions, performing statistical analysis, ability to connect to databases, making use of pivot tables, V-lookups etc. One such very useful feature within Microsoft Excel is the ability to make use of “macros”.

What is a Macro?

A macro is a recording of the commands and actions which are used in order to perform a task. Whenever you find that there is a particular task or series of tasks which you perform often, it may make sense to save the sequence of tasks as a macro for reuse later. Thus the applications of Macros to perform frequently occurring repetitive tasks can help free up your time to be spent more productively on doing something else instead.

How to Create Macros

There are two ways of creating macros within Microsoft Excel

1. The first is the Macro Recorder. Excel provides the ability to create macros by creating a recording of the tasks performed by the user. The Macro recorder is usually made use of for simple macros.

2. The second is using the macro editor which is used when complicated macros are required.

The Macro section can be accessed from within the View tab or the Developer tab in the Ribbon in Microsoft Excel.

Recording a Macro

The sequence of steps below details how to record a macro in Microsoft Excel

1. Open Microsoft Excel by clicking on Start>Programs>Microsoft Office>Microsoft Excel. Alternatively, go to Start>Run and type excel and hit the Enter key.

2. Navigate to the Macros section by clicking on the View tab in the Ribbon. Then select the Macros button.

3. A drop down menu appears in which View Macro and Record Macro options are available.

4. Click on the Record Macro button. A dialog box appears

a. Provide a suitable name for the macro.

b. Set a shortcut key for the macro (if required).

c. Choose where to store the macro, within ‘this workbook’, in a ‘new workbook’ or in a ‘personal macro workbook’. By default, it will be ‘this workbook’.

d. Give a detailed description (if required).

5. Perform the series of actions which you want saved within the macro. This step is very important and must be performed without any error because even the errors will get recorded as part of the macro.

6. Once you are done performing the steps required, click on the Macro button and choose Stop Recording from the drop down menu.

7. In order to run a saved macro, choose the Macro button and click on View Macros. A dialog box appears from which the required macro can be selected and run by clicking the Run button. Alternatively, if you know the keyboard shortcut assigned to that macro while creation, you can make use of the shortcut. Click on the Edit button to open Visual Basic Editor to edit the macro’s code. Click on Step Into to run the macro in Debug mode. Use the Delete key to delete unwanted macros.

Microsoft Excel File Type for Macros

Prior to Office 2003, macros could be used as part of just about any excel file. The normal excel format, .XLS could also store a macro. There was an option to enable or disable macros which needed to be set as required.

However post office 2003, with the introduction of the .XLSX format, Microsoft introduced a separate excel for Macro-enabled excel files known as .XLSM. Therefore, if you wanted to create and use macros within an Excel file, it had to necessarily be stored as .XLSM file. This can be seen while saving the file. Choose the Save as file type Excel Macro-enabled Workbook.

Whenever you open an .XLSM file, by default macros are disabled. This is to protect users from unknown content. Click on the Options button and select Enable his content in order to enable the use of macros in your spreadsheet.

~Deepak Kannan

Tags: ,

2 Responses to “Creating Macros in MS Excel”

  1. Sushant says:

    Thank you very much for sharing this!!!

  2. annectoo says:

    Thank you so much – I’ve always wanted to learn to do this.

Like these tips? Get them for FREE in your email!

WorldStart's Tech Tips Newsletter

  • Tech Tips Daily - Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

  • Tech Tips Weekly - If you don't want our Tech Tips newsletter every day, then sign up for this weekly newsletter to get the best information of the week. Sent on Fridays.

Other Newsletters

  • WorldStart's Daily Deals - Every week, we send out great deals in our Daily Deals newsletter. Many of these deals are exclusively for our Daily Deals newsletter subscribers and can't be found with our regular specials.

  • Just For Grins - Each issue includes a couple clean jokes, some funny quotes, and a hilarious reader's story. Newsletter is sent five days a week.


Enter Email Address:

Subscribe

Your e-mail address is safe with us!
We only use it to send you the newsletters you request. It is NEVER disclosed to a third party for any reason, ever! Plus, if you decided you don't like our newsletters (don't worry, you'll love them), unsubscribing is fast and easy.

Free Newsletter Signup



Tech Tips Daily

Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

Tech Tips Weekly

The week's best in tech and computer help. Get your issue sent to your email every Friday!

WorldStart's Daily Deals

The very best deals on the Internet! Get a new set of incredible sales every day of the week!

Just For Grins

Clean jokes, funny quotes, and hilarious comics. Sent 5 times a week straight to your email.


Subscribe


Love Worldstart? Refer A Friend!

WorldStart's Premium Membership

Tip Archive


Categories:
Archives: