Sheet Name Containing a Hyphen Gives an Error in ExcelLast reviewed: November 30, 1994Article ID: Q44012 |
The information in this article applies to:
SUMMARYBoth the TEXTREF macro function and the FORMULA macro function give an error message if the sheet name contains a hyphen (for example, "sheet-1.xls"). 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("SHEET-1.XLS!$A$4",TRUE) #REF! =FORMULA("=sheet-1.xls!r4c1",SHEET1.XLS!$A$2) #VALUE! =FORMULA("=sheet-1.xls!r4c1",'SHEET-1.XLS'!$A$2) #VALUE!The following do not cause an error:
=FORMULA("=sheet1.xls!r1c1",SHEET1.XLS!$A$2) =FORMULA("=sheet1.xls!r1c1",'SHEET-1.XLS'!$A$2) =FORMULA("-",'SHEET-1.XLS'!$A$2) |
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |