SHEET TAB NAME - show in cell A1??

itr674

Well-known Member
Joined
Apr 10, 2002
Messages
1,786
Office Version
  1. 2016
Platform
  1. Windows
How can I get the sheet tab name to show in cell A1 without having to RUN a macro?
This message was edited by em on 2003-02-09 17:31
 
I was able to get this to work...

=MID(MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,LEN(CELL("filename"))-SEARCH("]",CELL("filename"))),5,30)
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
em said:
I was able to get this to work...

=MID(MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,LEN(CELL("filename"))-SEARCH("]",CELL("filename"))),5,30)

Use at least

CELL("filename",A1)

instead of just

CELL("filename")
 
Upvote 0
roger that...

I assume using A1 is saying to Excel "put the result in A1".
 
Upvote 0
WAY COOL, ALADIN. It's a Keeper! Here's what they look like, plus two more Morefunc formulas.
Keepers3.xls
ABCD
1Path/FileName/SheetNameinCell
2ThankstoAladin,MrExcelmessageboard
3http://www.mrexcel.com/board2/viewtopic.php?t=13683
4Usingregularformulas
5Path,FileandSheetNameinCell:C:\Excelfiles\Keepers\[Keepers3.xls]MySheetName
6=CELL("filename",B6)
7SheetNameOnlyinCell:MySheetName
8=MID(B6,SEARCH("]",B6)+1,LEN(B6)-SEARCH("]",B6))
9-or-
10MySheetName
11=MID(CELL("filename",B6),SEARCH("]",CELL("filename",B6))+1,LEN(CELL("filename",B6))-SEARCH("]",CELL("filename",B6)))
12
13UsingMoreFuncAdd-infunction
14Path,FileandSheetNameinCell:C:\Excelfiles\Keepers\Keepers3.xls|"MySheetName"
15=FILENAME(TRUE)&"|"""&SHEETNAME()&""""
16PathandFileNameinCell:C:\Excelfiles\Keepers\Keepers3.xls
17=FILENAME(TRUE)
18SheetNameOnlyinCell:MySheetName
19=SHEETNAME()
My Sheet Name
 
Upvote 0
No matter how much I try, I cannot make

=CELL("filename")

do something strange. Can anyone help? And as sheetnames can not be longer than 31 characters, the formula for the sheetname can be shortened to:

=MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,32)

which is SO much simpler to understand!! :biggrin: :)
 
Upvote 0
goblin said:
No matter how much I try, I cannot make

=CELL("filename")

do something strange. Can anyone help? ...

Goblin,

In A1 in Sheet1 enter:

=CELL("filename")

In say E1 in Sheet2 enter:

=Sheet1!A1
 
Upvote 0
Hey, this is way cool!!!

It can even be useful! Maybe. It shows you on what sheet you were when the last calculation took place, Cell being a volatile function an all. What you're going to do with that information is still being speculated but I'm sure I'll think of something, sometime
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,408
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top