Excel: OFFSET() Function Returns #VALUE When File Is Closed

Last reviewed: July 11, 1995
Article ID: Q80108
The information in this article applies to:
  • Microsoft Excel for Windows, versions 3.0, 4.0, 4.0a, 5.0, 5.0c
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for OS/2, version 3.0
  • Microsoft Excel for the Macintosh, versions 3.x, 4.x, 5.0, 5.0a

SYMPTOMS

In Microsoft Excel, the OFFSET() function returns a reference value offset by a specified number of rows and columns from a given reference. If this reference refers to an external sheet, a #VALUE! error will be returned if the sheet is closed. This error will occur both in worksheets and in Microsoft Excel 4.0 macro sheets.

WORKAROUND

To return the correct result, use the appropriate procedure below.

Worksheet

Open the sheet that the reference is referring to.

Microsoft Excel 4.0 Macro Sheet

Open the sheet that the reference is referring to and run the macro again.

REFERENCES

"Function Reference," version 4.0, pages 299-300 "Microsoft Excel Function Reference," version 3.0, pages 163-164


KBCategory: kbother
KBSubcategory:

Additional reference words: 3.00 4.00 4.0 4.00a 5.00 5.00a 5.00c


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: July 11, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.