Is there a function that returns just the worksheet name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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!
 
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
 
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
 
=REPLACE(CELL("filename",A1),1,SEARCH("]",CELL("filename",A1)),"")
 
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!
 
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.
 

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

Back
Top