Reference to a worksheet name in a cell on another sheet

H

Howard Kaikow

Is there a way to use a built-in worksheet function, or defined name, to
refer to a worksheet name?

I'd like to fill a cell with the name of a worksheet, yet have the value in
that cell
automatically change if the worksheet name changes.
 
S

Shane Devenshire

Hi Howard,

Try something like this:

=MID(CELL("filename",Sheet2!C11),FIND("]",CELL("filename",Sheet2!C11))+1,100)

Where Sheet2!C11 is any cell reference on the sheet whose name you want.
For the active sheet, the one with the formula you can leave out the
Sheet2!C11.

Cheers,
Shane Devenshire
Microsoft Excel VBA
 
H

Howard Kaikow

Shane Devenshire said:
Hi Howard,

Try something like this:

=MID(CELL("filename",Sheet2!C11),FIND("]",CELL("filename",Sheet2!C11))+1,100
)

Where Sheet2!C11 is any cell reference on the sheet whose name you want.
For the active sheet, the one with the formula you can leave out the
Sheet2!C11.

Thanx.

Wonder why "sheetname" is not provided as an Info_type?
 
S

Shane Devenshire

Hi Howard,

I've suggested that to Microsoft in the past but nothing has come of it.
"Book", "Path" and "Drive" might also be nice. And there are others.

Cheers,
Shane

Howard Kaikow said:
Shane Devenshire said:
Hi Howard,

Try something like this:

=MID(CELL("filename",Sheet2!C11),FIND("]",CELL("filename",Sheet2!C11))+1,100
)

Where Sheet2!C11 is any cell reference on the sheet whose name you want.
For the active sheet, the one with the formula you can leave out the
Sheet2!C11.

Thanx.

Wonder why "sheetname" is not provided as an Info_type?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top