How to Create a Macro

Welcome to my Macro Tutorials.  In this tutorial I will teach how to create a macro. For a complete list of all my macro tutorials feel free to check out my Macro Tutorials.


There are two ways to create a macro in Excel 2010.
  1. First you can select Create from within the Macro Window. This will only create a blank macro with no purpose until you edit.  This is primarily used if you are familiar with the programming language used to create macros.
  2. The other way to create a macro within Excel 2010 is by using the Record command located on the Macro Menu in the View Tab.
 For the purpose of this tutorial we will use the second option.

Select View from the ribbon tabs.
View Tab



















Select the Macro Menu drop down arrow to open the Macro Menu.
Macro Menu - Record Macro





















Select the Record Macro. This will open the Record Macro Window.
Record Macro Window





















In this window you have the option to change the macro name, create a shortcut key and decide where you want to store your macro and provide a description.  For the purpose of this tutorial the only thing that matters is the name.  You can select what ever Excel chose for your or you can create you own name it doesn't matter as long as you understand that you don't want to create to macros with the same name.
 Select OK.
This will begin to record your macro.  Anything you do in within Excel from now until you select Stop Recording from the Macro Menu will be saved to this macro. Perform a few functions.  Change a cell color, add data, it doesn't matter what it is for the purpose of this tutorial. 
Now reopen the Macro Menu.
Macro Menu - Stop Recording


















 


Notice now Record Macro  has been replaced by Stop Recording.  This is how you will tell you macro to stop recording everything you do in Excel.
Select Stop Recording.

Congratulations.  You have created a macro.


No comments:

Post a Comment