Using Absolute and Relative References

In the CompanyAddress macro, Excel recorded references as absolute references in the A1 format (as opposed to the R1C1 format). As a result, the CompanyAddress macro always enters the company name in A6 and the address in A7 and A8.

In VBA, cell selections are recorded as absolute references unless you click the Relative Reference button on the Stop Recording toolbar. If you click this button, the recorder begins recording relative references. If you click the button again, the recorder records subsequent actions using absolute references—and so on. You can toggle between relative and absolute references at any time while recording.

Check the Relative Reference button before you record

The Relative Reference ...

Get Microsoft® Office Excel 2003 Inside Out now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.