The simplest way to create a macro in Excel is to use the macro recorder.
The first step is to open up the workbook (file) that you wish to use the macro in.
from the menu.
There are 4 points of interest:
- Type the name of your macro.
- (optional) this has to be a letter, we have used h
, so in our example the macro will run every time we hold down the CTRL
key and press the H
Store macro in
- This would normally be the workbook you are working on (this workbook), but you can save macros into a personal macro workbook.
- Here you can enter a description of the macro for your benefit.
When you have finished filling in the information click the OK
button to start the macro recorder.
You will now see the macro recording box as shown in fig 1.2
Everything you do now in the workbook will be recorded, so manually go through the process that you want your macro to recreate, for instance adding up a column.
When you have finished click on the small blue square within the macro recording box to stop recording.