Help with Macros
A macro allows you to repeat keystrokes without
having to retype them. For example, you could set up a macro in
Excel to format a heading. Then, whenever you wanted to format
cells that way, just highlight the cells and run the macro. The
steps for creating such a macro in Excel 2003 are as follows:
Excel's security must be set to "Medium" for macros
to be recorded. Security level is set at Tools/Macros/Security.
Whenever you open a workbook, you will still be prompted to enable
the macro, because it fears that the macro is malicious code,
since it is a program within Excel. Here is a great video that
shows you how to create a macro and add a button to run them: http://www.youtube.com/watch?v=Ycab4OiPug0
- To record the macro:
- Highlight the cells you want to format as a heading.
- Tools/Macro/Record New macro
- Change the macro name from "macro1" to whatever you want.
- If you want this to be able to be run this macro from a
control key, enter the letter you want to be able to press
with the control key to run this macro.
- Press ok to accept the name and control key setting.
- It will now record any keystrokes you type.
- Set up the heading however you like - format borders,
patterns, alignment, font.
- Hit the stop button on the record macro box. It looks like
the stop button on a DVD player.
- To run the macro on another sheet:
- Highlight the cells you want to format as heading.
- Tools/ Macro/ Macros
- Highlight your macro
- Press run
- To see the code you created in your macro:
- Tools/ Macro/ Macros
- Highlight your macro
- Press edit
- If you see that a specific selection was made, just delete
that line so it wont only work on certain cells.