Excel: Benefits of Using Defined Names in MacrosLast reviewed: November 2, 1994Article ID: Q51300 |
SUMMARYAssigning names to variables provides two important benefits when writing macros in Microsoft Excel:
When a worksheet is altered so that cell positions are changed, such as when a column or row is added, external references to the sheet using names continue to reference the appropriate cells. The use of cell references in such cases can result in incorrect operation. The use of names does not slow down macro operations; however, there is a performance penalty when names are first defined. Names can be defined by using any of the following commands:
DEFINE.NAME() SET.NAME() ARGUMENT() FOR()Set names in quotation marks only when defining a name or when the name text rather than the current value of the name is of interest. This applies to the following macro commands:
SET.NAME() DEFINE.NAME() FOR() DELETE.NAME() ARGUMENT() GET.NAME() MORE INFORMATIONMore information on macro functions is available in the "Microsoft Excel Function Reference" version 3.00 manual.
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |