Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
=CELL("filename")
will return the sheet name at the end of the file's path.
In my example:
C:\My Documents\[PhoneNumbers.xls]PhoneIn the above example you could use
=right(a1,5)
whereas the CELL formula was entered into cell A1 in order to produce "Phone" in the cell where you entered the "right" formula.You could use the CELL formula in a hidden cell and if your sheet names are consistant in the amount of characters used to produce the names this may be of help to you. Names such as JAN, FEB, MAR, APR, MAY, JUN, JUL etc.
See Excel, Help, Index under "CELL worksheet function" for the limitations of this formula.
Not what you asked for but is all I have,
Bryan

Note: the above works good if only used in one of the sheets in file. Otherwise it changes the sheet names.
An alternative is to use ASAP Utilites under Sheets, Insert Sheet(s) name in selected cell(s) function.
It works. ASAP Utilties is really a set of macros that run without you being able to see them. So it does use VB and therefore one can not use the Undo function in Excel after using one of it's many functions. Of course this particular function can always be deleted easily from it's cell.
I personally like ASAP Utilites other than the fact that about once per year it expires when they produce a newer free version. No big deal to install the new version but it does annoy me to "have to" upgrade. The price is always right.
Regards,
Bryan

The utilities you said are not an option for me, as it is for college work. basically what i have is a load of sheets that will all have the same layout, but need to say the name of the sheet you are currently in as a cell. i could type it in each one, but this would take quite a long time, and the names may easily change. therefore, i only want to have to change the name on the sheet itself, and the cells will update themself

In seeing your question I went on search to find an answer thinking it an easy enough thing to do and I now believe that it can not be done without VB.
With that being said my curiousity requires me to ask why you would need the sheet name displayed on the worksheet when you can see the worksheet name at the bottom of the sheet you are currently in?
If it were for printing purposes then you could add the Tab (Sheet) to the Custom Footer.
Regards,
Bryan

the reason being in my spreadhseet i hide the sheet tabs along the bottom, as it has to be designed for "dumb user" as the college calls them. it has to all be made as simple as it can, so i want the sheet name displayed atthe top, with none of the excel controls.
seems like i will just have to type it in each sheet manually then! thanks anyway

=MID(CELL("filename",A1:A1),(FIND("]",CELL("filename",A1:A1))+1),(LEN(CELL("filename",A1:A1))-FIND("]",CELL("filename",A1:A1))+1))

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |