Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Returning a Worksheet Name.

Returning a Worksheet Name

by Allen Wyatt
(last updated May 16, 2016)

3

Looking for a way to put the name of your worksheet directly into a cell? Excel makes this easy through the use of the CELL function. If you include the following in a cell, Excel returns the fully path of the workbook, along with the sheet name:

=CELL("filename")

For instance, if you entered this into a cell in the Sheet1 worksheet of the MyWB workbook, the information returned by Excel might be something like C:\My Documents\[MyWB.xls]Sheet1 (depending, of course, on the drive and directory in which the workbook is saved).

To return just the worksheet name from this value, you could use the following in your cell:

=MID(CELL("filename"),(FIND("]",CELL("filename"))+1),50)

This will work for any worksheet name up to 50 characters in length. (If you routinely use different lengths, simply change the value in the formula.) Continuing the earlier example, Excel would return Sheet1 as the result.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2146) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Returning a Worksheet Name.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Duplex by Default

Many printers these days have the capability to print on both sides of a piece of paper. You may want Word to use this ...

Discover More

Taskbar Setting isn't Sticky

Understanding how Excel sets the taskbars upon opening.

Discover More

Combining Multiple Rows in a Column

Do you need to concatenate the contents of a range of cells in the same column? Here's a formula and a handy macro to make ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (menu)

Ordering Worksheets Based on a Cell Value

Need to sort your worksheets so that they appear in an order determined by the value of a cell on each worksheet? Using a ...

Discover More

Independent Radio Buttons

Radio buttons are great for some data collection purposes. They may not be that great for some purposes, however, for the ...

Discover More

Synchronized Workbook and Worksheet Names

When you work on older workbooks in Excel, you may notice that the name of the worksheet tab and the workbook itself are the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 5?

2013-07-09 09:59:09

Ananthu Krishnan

How to Return Mutiple Worksheet Names in a Workbook


2012-08-21 21:05:35

Gana

Thanks. This will always get the worksheet name of the worksheet in which formula is writte. But how do we get the name of the other worksheets in the excel file ?


2012-06-01 02:54:24

Junaid Khawar

Than BigG Brother... It was very very helping to me....
Thanx once again...


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.