Need function to insert worksheet name into a cell of that worksheet.

I have found a formula on the web help site to 
automatically insert a worksheet name into a cell of the 
worksheet.  I have several worksheets and wish to identify 
each worksheet automatically in a cell of each worksheet.  
When I use the formula it initially brings in the correct 
worksheet name.  However when I select another worksheet 
the prior name appears in the selected cell.  
 
Perhaps I need to change something in my formula or this 
is a problem that I can't correct.  What is your 
suggestion?
 
The following formula is what I am using in each 
worksheet.  
=MID(CELL("filename"),SEARCH("[",CELL("filename"))
+18,SEARCH("]",CELL("filename"))-2 )
 
Perhaps there is a simpler way to insert the worksheet 
name into a cell.  Something like;  =cell("worksheet"), or 
=cell("filename,-path").  I haven't been able to find the 
solution.  Please advise.

Thanks
0
pct2gus (1)
10/8/2004 11:47:29 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
388 Views

Similar Articles

[PageSpeed] 17

Try the response to this FAQ at Debra Dalgleish's site:
http://www.contextures.com/xlfaqFun.html#SheetName

Notice that the response includes a cell from the worksheet.

It's probably a good thing to add to your formula, too!

August Meduna wrote:
> 
> I have found a formula on the web help site to
> automatically insert a worksheet name into a cell of the
> worksheet.  I have several worksheets and wish to identify
> each worksheet automatically in a cell of each worksheet.
> When I use the formula it initially brings in the correct
> worksheet name.  However when I select another worksheet
> the prior name appears in the selected cell.
> 
> Perhaps I need to change something in my formula or this
> is a problem that I can't correct.  What is your
> suggestion?
> 
> The following formula is what I am using in each
> worksheet.
> =MID(CELL("filename"),SEARCH("[",CELL("filename"))
> +18,SEARCH("]",CELL("filename"))-2 )
> 
> Perhaps there is a simpler way to insert the worksheet
> name into a cell.  Something like;  =cell("worksheet"), or
> =cell("filename,-path").  I haven't been able to find the
> solution.  Please advise.
> 
> Thanks

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10083)
10/8/2004 11:52:38 PM
Hi
see:
http://www.xldynamic.com/source/xld.xlFAQ0002.html

For an easier formula you would need vBA (a user defined function)

--
Regards
Frank Kabel
Frankfurt, Germany

"August Meduna" <pct2gus@yahoo.com> schrieb im Newsbeitrag
news:1b1e01c4ad91$2c1bd060$a301280a@phx.gbl...
> I have found a formula on the web help site to
> automatically insert a worksheet name into a cell of the
> worksheet.  I have several worksheets and wish to identify
> each worksheet automatically in a cell of each worksheet.
> When I use the formula it initially brings in the correct
> worksheet name.  However when I select another worksheet
> the prior name appears in the selected cell.
>
> Perhaps I need to change something in my formula or this
> is a problem that I can't correct.  What is your
> suggestion?
>
> The following formula is what I am using in each
> worksheet.
> =MID(CELL("filename"),SEARCH("[",CELL("filename"))
> +18,SEARCH("]",CELL("filename"))-2 )
>
> Perhaps there is a simpler way to insert the worksheet
> name into a cell.  Something like;  =cell("worksheet"), or
> =cell("filename,-path").  I haven't been able to find the
> solution.  Please advise.
>
> Thanks

0
frank.kabel (11126)
10/8/2004 11:57:23 PM
Reply:

Similar Artilces:

Not sure if Excel can do what i need
Hello all, I am obviously a new user to excel. I have a psychological assessmen that needs to be computerised for ease of use in obtaining results. Here is what i would like to happen. I have 28 questions with fiv Likert scale options(0-4) for answers. Each question addresses 1 of different personality traits. So questions 1, 6, 8, 22 look at anger. Where as questions 2, 9, 28 look at happiness. What i would like is fo excel to group the answers and give me the total number for each trait. Then based on that number, give out a prewritten (which i would provide result of the assessment. ...

Need Min Value from Row and Heading Value that Corresponds to it.
I have a table that looks somewhat like this w/o the *'d headings: h1 h2 h3 h4 h5 h6 h7 *Min Price *Heading $5.00 $6.00 $3.00 $4.00 $9.00 $1.00 $9.00 $1.00 h6 $3.00 $6.00 $8.00 $65.00 $9.00 $2.00 $4.00 $2.00 h6 $4.00 $9.00 $5.00 $7.00 $1.00 $2.00 $8.00 $1.00 h5 $9.00 $7.00 $6.00 $3.00 $9.00 $8.00 $2.00 $2.00 h7 $7.00 $8.00 $9.00 $7.00 $9.00 $8.00 $8.00 $7.00 h1 I have several SKU's with various price contract/programs. I want to find the best price in one cell and the heading that would correspond to that cell in another. I was trying to do this with an expression ...

regarding wince's debugging function...
If ms doesn't provide a source code, source code tracking deep into assembly code when step by step code running using kitl. In that case, is it possible to know the corresponding library file currently running? You can see the call stack window to see where you are running from -- Luca Calligaris (MVP-Windows Embedded) l.calligaris.nospam@eurotech.it.nospam www.eurotech.it "daniel" <daniel@discussions.microsoft.com> ha scritto nel messaggio news:26BBF36B-FF30-47DB-98D1-79134466DF70@microsoft.com... > If ms doesn't provide a source code, sourc...

Excel need help
I have 2 columns a and b . a contains payment b contains balance. I have the entire col b with the formula. my ? is when the balance appearsin b it is in all the cells in that column.I only want it in the used ones, not the unused ones:( example $270.00 16,730.00 $270.00 16,460.00 $100.00 16,360.00 $300.00 16,060.00 $270.00 15,790.00 15,790.00 15,790.00 15,790.00 15,790.00 15,790.00 this 15790.00 is in col b...not a...I want no bal in unused cells -- fiftieslady ------------------------------------------------------------------------ fiftieslady's Profile: http://www.excelforum.co...

Need Help Linking Sheets
How can I link 2 pages without using the actual sheet as a reference? In other words, can I have two sheets linked by Identifying the same exact names one on each sheet? ...

Excel newbie needs help from math wiz (poker related)
I want to create a Excel workbook that will help in specific poker situations. Short version: I want to be able to calculate how often my opponent will need to fold for an all-in raise to show a positive expectation. Explanation: In poker you can win a hand by having the best hand at the end OR getting your opponent to fold. A common situation comes up where you have a "drawing hand" and face a bet by your opponent. In this situation you know you are currently behind in the hand, but have a chance to win if you catch some of your "outs" (cards that will give you th...

Macro help needed........
How do I sort a particular column in ascending order and change the pag setup to landscape and margins to 0.25 using a macro code ? does anyone have a macro code for this ????? -- Message posted from http://www.ExcelForum.com Hi you have already received some answers in your previous threads please don't multipost! -- Regards Frank Kabel Frankfurt, Germany > How do I sort a particular column in ascending order and change the > page setup to landscape and margins to 0.25 using a macro code ? > > does anyone have a macro code for this ?????? > > > --- > Me...

Need to test a mobo
I had a power surge about 3 weeks ago - lost a drive, now making ticking noises. I had another two drive that seem to work sporadically now. So, I thought it might have been my power supply. Bought a tester and found out that all seems well. Next, I bought a new hard drive and found that it was also acting up - making noises like whirring up and down (like the other drives I thought were dead). So I am starting to wonder if it is my mobo - but how can I test this out? I am using a dual boot - Win XP and Win 7 - both drives work and don't work. Up and down. Right now my Win7 ...

Link to a cell in another workbook by name rather than absolute c.
I need to get data from a total cell in one worksheet into a cell in another worksheet. Because the source worksheet will have lines added to it, I wanted to reference the cell by its row and column label (e.g. "Jan Sales"), rather than by an absolute cell reference. I tried several variations and keep getting the #REF and #NAME errors. Does anyone know how to do this? Thanks. Name the actual cell and then reference the cell's name. -- Cutter ------------------------------------------------------------------------ Cutter's Profile: http://www.excelforum.com/membe...

Help needed
is there anyway you can see what links to other workbooks are associated with the workbook you have open. The problem i am having is when i open the workbook in question a message appears and states "The workbook you opened contains automatic links to information in another workbook. do you want to update this workbook with changes made to the other workbook" Yes....... No. if i click No the workbook opens, however if i click Yes the workbook just hangs and i have to go into task manager to shut down the system. I can only assume that there is a problem with one of the links....

Publisher 2002 Inserting a landscape page into portrait document
How can I insert one landscape page into a presentation consisting portrait pages? I understand the inserting of page numbers, but I can't find the page orientation. Publisher does not allow you to have different orientation pages. Group all items on the page and rotate 90�. -- ...

2 sumif functions in one formula
Is it possible to have 2 sumif functions in one formula and return the same results. If so, how would the formula be written? Thanks. Todd If you are to return the same results why do you need 2 formulas? It would be good to give specifics with examples. -- Don Guillett SalesAid Software donaldb@281.com "Todd" <anonymous@discussions.microsoft.com> wrote in message news:04d201c3b391$f9f5ef20$a301280a@phx.gbl... > Is it possible to have 2 sumif functions in one formula > and return the same results. If so, how would the formula > be written? Thanks. > > T...

Need help on this....thanks
I have an Excel worksheet which stored a survey outcome of over 1200 members. There are over 30 questions in the survey and the first column captured the member ID. The problem is 3 of the survey questions that allow multiple answers, instead the answer for those three questions are captured in seperate column, the answers are stored in a single column and it makes it very difficult to analysis those result. As a result I created addittional columns depending on the total number of the answers available for that question and assign the result manually to that column. It is very time consuming ...

I need Help
I have a random popup that i cant stop,when it does come up it seems to know what i was looking at,like when i was looking for registry cleaner it popped up and showed me one,any help would be great. On Jan 22, 6:57=A0am, Larry <La...@discussions.microsoft.com> wrote: > I have a random popup that i cant stop,when it does come up it seems to k= now > what i was looking at,like when i was looking for registry cleaner it pop= ped > up and showed me one,any help would be great. To eliminate questions and guessing, please provide additional information about your sys...

need help badly
How do you print ole objects.. Thanks lachanda -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200710/1 On Wed, 03 Oct 2007 18:13:40 GMT, "misschanda via AccessMonster.com" <u36612@uwe> wrote: >How do you print ole objects.. >Thanks >lachanda What *kind* of OLE objects? Many of them are binary blobs (such as programs) which are inherently not printable. More details please! John W. Vinson [MVP] ...

In Cell Editing
Hi there: Been using Excel for years but haven't asked this question until now... Could have saved myself a few days likely! Anyway, say I type BACON in a cell and press enter or tab - the focus moves to the cell below. If I arrow back up to the cell that has BACON in it, how do I start editing it without double clicking on it with the mouse? I don't want to delete BACON and start again, I want to edit BACON. After I'm done, I want to eat bacon. haha Thanks Press F2 -- Regards, Peo Sjoblom (No private emails please, for everyone's benefit keep the discussion in ...

VBA code to run macro in certain file based on name of file in cel
I am trying to come up with code that will run a macro in a workbook where the path and name of the workbook are in a cell reference. I have tried the following with no luck. The path to the file is located in cell F36 of worksheet, "Customize" and the name of the file is located in cell F42. The name of the macro is "ClearTotalSavings". Any help from one of you gurus would sure be appreciated. Application.Run "'" & Workbooks(Sheets("Customize").Range("F36").Value) & "\" & Sheets("Customize").R...

Stuck in review and need to be in design.
I am using Visio 2007. I need to complete the diagram that I have been working on and I hit the review key by mistake. How do I get back to the design screen? On Wed, 4 Nov 2009 16:14:01 -0800, cameron <cameron@discussions.microsoft.com> wrote: >I am using Visio 2007. I need to complete the diagram that I have been >working on and I hit the review key by mistake. How do I get back to the >design screen? menu Tools -> Track Markup and then close the Review window. -- Regards, Paul Herber, Sandrila Ltd. DFD/SSADM for Visio http://www.visio-dfd.sa...

Field with both first name and last name
I have a table where the field PRODUCTION_DESIGNER is composed of a persons first and last name with a single space between them, for example "David Henderson" is in the contents. Select this field and truncate this to the initials of the first and last name and place into another field leaving the original field untouched. The new field would have "DH" as its contents. Thank you Use the expression Left(Production_Designer,1) & Mid(Production_Designer,Instr(Production_Designer," ")+1,1) If you want to do this in an update query UPDATE [Your Table ...

Need Help Despertly!
I am in a desperate situation. I had to reformat my hard drive. Prior to do this, I copied my entire User Profile to another drive. I can now access my User Profile information from Windows Explorer. Now that I installed Microsoft Outlook, I do not see any of my Contacts. I need to restore my Contacts to the new Outlook installation. Again, I did save my entire "User Profile" from my previous installation of Windows 2000 Professional. I just do not know how to access my Contact information from Outlook that included addresses and phone numbers and such. Any help would be greatly appr...

Ranking range of cell with value only
I am ranking set of numbers (# of days worked) in a 10 cell column but the numbers of persons I rank differs from day to day. If I enter "0"(zero) on one of the cell, it ranks the whole ten cells. I have to enter Zero because that is the number of days worked. How can I enter the value of zero that does not activate the other blank cells? Here is my formula: =IF(ISNA(RANK(B5,$B$5:$B$14,1)),"",RANK(B5,$B$5:$B$14,1)) Thanks. -- cardingtr ------------------------------------------------------------------------ cardingtr's Profile: http://www.excelforum.com/member.ph...

Publishing charts
We are using Excel to manipulate some real time data then publish the updated results every 15 minutes to the Internet. I am publishing charts using Excel's Save as Web Page feature, but then only want to use the images of the charts as an included image in the actual web pages. The images end up with names like "xyz_89654_image001.gif". The "image001.gif" part I don't have a problem with - as long as there is only one image in each subdirectory, that will be it, and the xyz comes from the workbook name. It's the number in the middle that I have real prob...

Find & replace a value in an unknown cell location
Is there a function I can use to find a text string in a particular column - say in column (H) for string 'Mytotal' to be replaced by 'Subtotal' when the cell location of 'Mytotal' is unknown only the column is known? And also is there a function that can find a certain value in a column then delete the row below the found value? e.g in column (H) find 'Subtotal' then delete the row below the occurance of 'Subtotal'. Help is much appreciated with this one? You can use MATCH to find where "Mytotal" is located, assuming you know either th...

Plug in needed
Looking for an Outlook plug in which, on reply to a e-mail, will:- a) allow selective quoting only, and b) not top quote. Anything around at all? Much to my horror (sorry guys) the Boss wants us to use Outofluck at work! -- On the carpool lane lane to Nirvana. John Phillips <flatulentdingo@deadspam.com> wrote: > Looking for an Outlook plug in which, on reply to a e-mail, will:- > > a) allow selective quoting only, and > > b) not top quote. > > Anything around at all? The best Outlook adjunct I've found for quote handling on replies is Outlook-Quotef...

Workbook/Worksheet
I am working with a template to create individual invoices that contain macros. Every time i save an individual invoice a workbook is created. How can i force the invoice to be a single document and not part of a workbook. When I press save file I get a message.... The contents of this workbook have already been saved as a record in the database. Update, Create new or don't update. I do not want these saved in a database. I just want single one page Worksheets saved HELP please You cannot have a worksheet outside of a workbook. An alternative would be to save all your sheets t...