Is there a function that returns just the worksheet name

B

Bene

I'd like to use the worksheet name to automatically adjust calculations in
the worksheet.

I know that it's possible to return the full file name using
CELL("filename") and feel sure that there must be a similar option for just
the worksheet name.

Can anyone help?

Many thanks.
 
N

Nicole L.

If you need a cell to be populated with the worksheet name, you can go to
Insert - Hyperlink and choose the worksheet in your current workbook, but
make sure you modify the Text to be displayed in they hyperlink to say what
you want.
Maybe that could work for your purposes?

The only other thing I know of, with automatically inserting worksheet names
is inserting the [Tab] name.
For example, when I want to input the filename and the tab name (worksheet
name) in the footer of a spreadsheet, when you go to the Footer page, the
Insert TAB Name is the last button in the row of choices, right next to the
Filename button. The icon looks like a spreadsheet with tabs on the bottom.

Best of luck!
 
P

Peo Sjoblom

The workbook has to be saved

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

you need to use a cell reference in it, any cell refernece is OK


Regards,

Peo Sjoblom
 
B

Bernard Liengme

Try
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)
OR
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)

The second removes the XLS extension
 
B

Bene

Wow!

I've never used this sort of discussion group before. I spent hours trying
to work it out, when I could have just posted earlier and got all these
helpful replies really quickly. Thank you everyone!

I shall definitely be back next time I have a problem!
 
M

Matt D Francis

Brilliant - sorry for being an interloper but I've been needing this function
for ages!

Matt

Aladin Akyurek said:
=REPLACE(CELL("filename",A1),1,SEARCH("]",CELL("filename",A1)),"")
I'd like to use the worksheet name to automatically adjust calculations in
the worksheet.

I know that it's possible to return the full file name using
CELL("filename") and feel sure that there must be a similar option for just
the worksheet name.

Can anyone help?

Many thanks.
 
Top