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

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

Additional query words: 4.0 4.00a 5.00a 5.00c

Keywords :
Version :
Platform :
Issue type :


Last Reviewed: March 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.