Setting the macro recorder for absolute or relative reference
In this recipe, we will be working with relative macro recordings.
The default setting for a macro recording is absolute. In simple English, this means that the execution of your macro will always start on the same cell where the recording was done.
With a relative setting, you can record a macro and choose a different starting point when executing the macro. Unlike the absolute reference macro, you are not restricted to a specific range or starting point.
Getting ready
Open Excel and make sure that Book1 is active.
How to do it…
To record a macro in relative mode, do the following:
- Click in cell A1. Activate the Developer ribbon.
- In the Code group, select the Use Relative References option:
- Still in the Code group, click on Record Macro. The Record Macro dialog box appears:
- In the...