Microsoft KB Archive/44012

{|
 * width="100%"|

Sheet Name Containing a Hyphen Gives an Error in Excel

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 5.0
 * Microsoft Excel for the Macintosh, versions 4.0, 5.0

-

SUMMARY
Both the TEXTREF macro function and the FORMULA macro function give an error message if the sheet name contains a hyphen (for example, &quot;sheet-1.xls&quot;).

These error messages seem to be caused by the hyphen in the name. If you take the hyphen out, the error disappears. Hyphens seem to be a problem only if the hyphen is in an actual sheet name; a hyphen in another part of a FORMULA or TEXTREF statement does not seem to cause the problem.

The following are examples of statements that can cause the error:

  =TEXTREF(&quot;SHEET-1.XLS!$A$4&quot;,TRUE)                       #REF!

=FORMULA(&quot;=sheet-1.xls!r4c1&quot;,SHEET1.XLS!$A$2)          #VALUE! =FORMULA(&quot;=sheet-1.xls!r4c1&quot;,'SHEET-1.XLS'!$A$2)       #VALUE!

The following do not cause an error:

=FORMULA(&quot;=sheet1.xls!r1c1&quot;,SHEET1.XLS!$A$2) =FORMULA(&quot;=sheet1.xls!r1c1&quot;,'SHEET-1.XLS'!$A$2) =FORMULA(&quot;-&quot;,'SHEET-1.XLS'!$A$2) Additional query words: 2.0 2.00 2.01 2.1 2.10 3.0

Keywords :

Version :

Platform :

Issue type :

Technology :