How to Learn Microsoft Excel Macros
Microsoft Excel macros are pieces of executable code that can automate Excel functions that you frequently carry out. For example, a macro can format a document for you or create a chart at the push of a button. You don't need to know a programming language to write a macro: Excel's Record Macro feature does the heavy work for you. All you need to learn Excel macros is to create a macro once and you'll be on your way.
Instructions
-
-
1
Open an Excel document.
-
2
Click on the "View" tab.
-
-
3
Click "Macros" and then click on "Record Macro."
-
4
Type a name for your macro into the "Macro name" box.
-
5
Type a shortcut key into the "Shortcut key" box. For example, type "P" to use "Ctrl" and "P" as your shortcut keys for this macro.
-
6
Type a description into the description box. This may help you to identify what the macro does at some point in the future.
-
7
Click on the "OK" button. The macro is now recording your keystrokes and mouse clicks.
-
8
Perform the function that you want the macro to automate. For example, make a chart or template.
-
9
Click on the "Macro" button and then click on "Stop Recording." Your macro is now complete.
-
10
Run the macro to check it does what you are expecting it to do. Click on "Macros" and then "View Macros." Click on the macro you just recorded and then click on "Run."
-
11
Repeat Step 1 through 9 to record as many macros as you like. After you've been through macro recording a few times you'll get a feel for what you can accomplish with the recorder.
-
1
Tips & Warnings
Make the name unique so you can recognize it in the future. For example, don't name the macro "Macro 1" or "my macro." Call it something meaningful instead like "BillTemplate" or "MakePieChart."
To delete a macro, click on "Macros" and then "View Macros." Click on the macro name and then click on "Delete."
References
- Photo Credit keyboard image by Fyerne from Fotolia.com