The information in this article applies to:
SUMMARY
In Microsoft Excel, if you want to create a formula that displays the
file name of a worksheet in a cell but you do not want to use a macro,
use the appropriate following method.
MORE INFORMATIONMicrosoft Excel for Windows or Microsoft Excel for OS/2To display the name of the current worksheet, enter the following formula as an array formula
where "filename" is literally the word "filename", in quotation marks. NOTE: The above formula must be entered as an array formula. To enter a formula as an array formula in Microsoft Excel for Windows, press CTRL+SHIFT+ENTER. In Microsoft Excel for the Macintosh, press COMMAND+ENTER. The formula returns the name of the worksheet as long as the worksheet has been saved at least once. If you use this formula on an unsaved worksheet, you receive a #VALUE! error value. In Microsoft Excel 5.0 or later, the formulas above will return the name of both the workbook and the active sheet. To return the name of the file only, use the following formula:
Microsoft Excel for the MacintoshTo display the name of the current worksheet, enter the following formula as an array
where "filename" is literally the word "filename" in quotation marks. NOTE: The above formula must be entered as an array formula. To enter a formula as an array formula in Microsoft Excel for Windows, press CTRL+SHIFT+ENTER. In Microsoft Excel for the Macintosh, press COMMAND+ENTER. In Microsoft Excel 5.0 or later, the formulas above will return the name of both the workbook and the active sheet. To return the name of the file only, use the following formula:
REFERENCES
"Function Reference," version 4.0, Pages 46, 239, 252, 377 Additional query words: XL98 XL97 XL7 XL5 XL4 XL3 macrosheet template howto
Keywords : xlformula |
Last Reviewed: April 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |