Using INDIRECT Maintains an Absolute Range in a Defined Name

Last reviewed: November 3, 1994
Article ID: Q72266
The information in this article applies to:
  • Microsoft Excel for Windows, versions 3.0, 4.0, 5.0
  • Microsoft Excel for OS/2 version 3.0

SUMMARY

When you add or delete a row or column within a named range, Microsoft Excel versions above update the name's reference to include the change. This is inconsistent with earlier versions of Microsoft Excel and is the result of a new dynamic method of linking with Microsoft Excel version 3.0 and later.

To maintain an absolute reference to a range, use the INDIRECT function when defining the name. You can still use this name normally, and it acts as it did in earlier versions of Microsoft Excel. When entering the argument to the function, give the range in the form of text. This text is not updated when rows or columns are added or deleted or parts of the range are moved elsewhere in the sheet.

NOTE: Names defined in this way will not be listed when you Choose the Goto option from the Formula menu. To Goto such a name, type the name in the Reference field.

Example

  1. Select cells A1 through A3 in a worksheet.

  2. From the Formula menu, choose Define Name.

  3. In the Refers To box, type "=INDIRECT("$A$1:$A$3")" (without the surrounding quotation marks).

  4. In the Name box, type "Test" (without the quotation marks).

  5. Choose OK.

You can now manipulate the cells A1:A3 in any way you want; however, Test will still refer to A1:A3.

REFERENCES

Online Help, version 5.0, linking "User's Guide 1," version 4.0, pages 362-373 "User's Guide," version 3.0, pages 309-316


KBCategory: kbusage
KBSubcategory:

Additional reference words: 3.0 3.00 4.0 4.00 5.0 5.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 3, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.