Any idea what formula to use if I want a cell in the excel sheet to show the name of the worksheet?
Any idea what formula to use if I want a cell in the excel sheet to show the name of the worksheet?
Thank you in advance,
Gilbert
I looked for 4 years before I found this.
Yes it will. we just have to figure out how...
If I have helped you, PLEASE click the * and add to my Rep.
Also, if the problem is SOLVED please mark it as so.
Sounds like you want to use the CELL("filename") Function. Here's a list of the variations you might want;
For any of these to work the workbook must be saved first.
Let us know if it works.Please Login or Register to view this content.
ChemistB
Ya.. it works well with my worksheet.. but mind to explain a bit how does this formula works? I am using the last one where showing Worksheet name only. Wonder why reference is to cell A1?Originally Posted by ChemistB
Okay, starting with your second question. It references cell A1 simply to "ground" the formula within that worksheet. If that were not there, the formula would calculate based on the last sheet you made a change.
The formulareturns the entire path including workbook name and sheet name.Please Login or Register to view this content.
WithThe MID function plucks a certain number of characters from a string with the format =MID(TEXT,Starting Number, Number of Characters).Please Login or Register to view this content.
The FIND function finds what position (#)the "]" is which appears right before your sheetname and then adds 1 (where your sheetname starts). 255 is an arbitrary number to cover the number of characters in your sheet name.
ChemistB
Code remove as unwrapped
New lines added.
How about picking up certain part of the workbook filename, that is without showing the file extension - .xls?
Last edited by gilbert; 08-14-2008 at 09:27 PM.
Got it now.....
=MID(LEFT(CELL("filename",A1), FIND("]", CELL("filename", A1))- 5), FIND("[",CELL("filename", A1))+1, 255)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks