The information in this article applies to:
SUMMARYIn Microsoft Excel, you may be unable to complete certain actions or use certain add-in functions on worksheets when the name of the worksheet contains an apostrophe ('). MORE INFORMATION
In Microsoft Excel, the apostrophe is a special character you can use in
references. If you include a workbook path in the reference, or if the
workbook or sheet name contains space characters, or if the sheet name
begins with a number, you must enclose the path, filename, and
sheet name in apostrophes. For example, a formula that refers to
cell A1, on a worksheet called 1994 Figures, in BOOK1.XLS, would appear as
follows:
Note that the apostrophes enclose the workbook and worksheet names. The apostrophes are necessary because the space between 1994 and Figures could be interpreted as a divider between items. If the name of your worksheet contains an apostrophe, and you want to reference a range on this worksheet, you must add another apostrophe to the reference in order to distinguish the apostrophe in the name from apostrophes that enclose a name. For example, to reference cell A1 on the worksheet "1995's Forecasts" in BOOK1.XLS, use the following formula:
If your worksheet name contains an apostrophe, you may be unable to complete certain operations that use the worksheet name. Examples of these operations are shown below. In general, avoid using apostrophes in your worksheet names. EXAMPLESPrint Area not Retained in a ViewIf the name of your worksheet contains an apostrophe, and you create a view, using View Manager, the print area that is set for the view may not be retained.WORKAROUND
To retain the print area set for a view created with View Manager, you must
rename the worksheet with a name that does not contain any apostrophes, and
then you need to recreate the view.
Cannot Delete Locally Defined NamesIf the name of your worksheet contains an apostrophe, you cannot delete locally defined names on the worksheet. when you select the name in the Define Name dialog box and choose Delete, you receive the error message "That name is not valid" appears and the name is not deleted.To delete a locally defined name, such as '1995''s Forecasts'!Print_Area, you must rename the worksheet with a name that does not contain any apostrophes. Cannot Create Locally Defined NamesIf you try to create a local name on a worksheet when the worksheet name contains an apostrophe, you receive the following error messageand the name will not be added. To create a local name on a worksheet when the worksheet name contains an apostrophe, do the following:
Cannot Return Data from Microsoft QueryIf you use the Get External Data command, and you return query data from Microsoft Query to a worksheet name contains an apostrophe (or a space), the data is instead returned to the worksheet that was active when you chose the Get External Data command.To avoid this behavior, do either of the following:
REFERENCES"User's Guide," version 5.0, pages 144-149 Additional query words: 5.00a 5.00c 7.00a XL7 XL5
Keywords : kbtool xlquery |
Last Reviewed: April 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |