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
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
On 2002-07-07 07:22, em wrote:
How can I get the sheet tab name to show in cell A1 without having to RUN a macro?

In B1 enter:

(1)

=CELL("filename",A1)

In A1 enter:

(2)

=MID(A1,SEARCH("]",A1)+1,LEN(A1)-SEARCH("]",A1))

You can substitute CELL("filename",A1) for A1 in (2), if so desired, to reduce the whole thing to a single formula.

An alternative would be

=SHEETNAME()

that uses a UDF from the Morefunc add-in, freely downloadable at:

http://longre.free.fr/english/index.html
 
Upvote 0
When I add the add-in function is that attached to the file? In other words will anyone who opens this on another computer see the tab name?
 
Upvote 0
On 2002-07-07 08:29, em wrote:
When I add the add-in function is that attached to the file? In other words will anyone who opens this on another computer see the tab name?

No. All users must add the add-in. Since that's inconvenient, you'd better use the formulas with built-in functions.

Aladin
 
Upvote 0
Rogggg--I used the formula and put it together in one--it works perfectly--THANKS.

If you have time some day--could you explain how it works ...
 
Upvote 0
Put the CELL function in a cell by itself and see the result.

Then, put the SEARCH function in a cell by itself and look at the result.

Then, look up XL help for SEARCH, LEN, MID, and CELL.

You'll have the answer to 'how it works!' :)
 
Upvote 0
OK, what am I doing wrong!!!!!

I put =CELL("filename",A1) in B1 and nothing shows up!!!!!!

NEVER MIND -- NOW IT IS ALL WORKING,.... :oops:
 
Upvote 0
Using the below this formula to put sheet name in A1, but sheet names all have a 5 alpha-numeric prefix and I do not want that part of the sheet name. I have been playing with LEFT but haven't had any luck????

MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,LEN(CELL("filename"))-SEARCH("]",CELL("filename")))
 
Upvote 0
em said:
Using the below this formula to put sheet name in A1, but sheet names all have a 5 alpha-numeric prefix and I do not want that part of the sheet name. I have been playing with LEFT but haven't had any luck????

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


A1:

=CELL("filename",A1)

B1:

=RIGHT(A1,LEN(A1)-SEARCH(CHAR(127),SUBSTITUTE(A1,"]",CHAR(127),LEN(A1)-LEN(SUBSTITUTE(A1,"]","")))))
 
Upvote 0

Forum statistics

Threads
1,215,329
Messages
6,124,302
Members
449,150
Latest member
NyDarR

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