Microsoft KB Archive/98631

= Microsoft Knowledge Base =

Referencing Filename Containing R, C, or Number Causes Error
Last reviewed: September 12, 1996

Article ID: Q98631

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a
 * Microsoft Excel for OS/2, versions 2.2, 3.0
 * Microsoft Excel for the Macintosh versions 2.2, 3.0, 4.0

SUMMARY
In Microsoft Excel, when you reference a file in a function, if the filename of the referenced file contains the letter R or C and a number, or the filename begins with a number, you may receive a #VALUE! error value or a #REF! error value.

For example, if your file is named R5.XLS, Microsoft Excel will interpret this filename to be a cell reference -- this interpretation will cause an error.

Workaround
To work around this problem, enclose the filename in single quotation marks ('). That is, on the worksheet, instead of using the statement

=INDIRECT(&quot;1234.XLS!$A$1&quot;) use:

=INDIRECT(&quot;'1234.XLS'!$A$1&quot;) -or-

Instead of using the macro statement

=FORMULA(GET.FORMULA(&quot;R5.XLS!R1C1&quot;),b1) use:

=FORMULA(GET.FORMULA(&quot;'R5.XLS'!R1C1&quot;),b1) Note: In versions of Microsoft Excel earlier than version 3.0, the INDIRECT function is a macro function only.

STATUS
Microsoft has confirmed this to be a problem in the versions of Microsoft Excel listed above. This problem was corrected in version 5.0 of Microsoft Excel for Windows.