A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do I lookup a worksheet name in excel?



 
 
Thread Tools Display Modes
  #1  
Old May 30th 08, 01:56 AM posted to microsoft.public.excel.worksheet.functions
RJL007
external usenet poster
 
Posts: 1
Default How do I lookup a worksheet name in excel?

Is there a function in Excel that will return the name of the current
worksheet as a text string?

If not a function, is there some other way of looking up the current
worksheet's name (perhaps VB) and saving/displaying it in a cell?
Ads
  #2  
Old May 30th 08, 02:14 AM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_574_]
external usenet poster
 
Posts: 1
Default How do I lookup a worksheet name in excel?

There are two ways to interpret "name of the current worksheet". If you mean
the function is on, say, Sheet3 in cell A1 and you are on Sheet2 with a
reference to that cell (=Sheet3!A1) and you want to see the name of the
sheet that the sheet the function is actually on, then use this...

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

in A1 on Sheet3. But if, instead, what you want is the name of the active
sheet (that is, the sheet name that the =Sheet3!A1 formula is on, then leave
the cell references out of the above formula...

=MID(CELL("filename",FIND("]",CELL("filename")+1,256)

Rick


"RJL007" > wrote in message
...
> Is there a function in Excel that will return the name of the current
> worksheet as a text string?
>
> If not a function, is there some other way of looking up the current
> worksheet's name (perhaps VB) and saving/displaying it in a cell?


  #3  
Old May 30th 08, 02:29 AM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_575_]
external usenet poster
 
Posts: 1
Default How do I lookup a worksheet name in excel?

I should mention... in order for the formulas I posted to work, the workbook
needs to be saved first, otherwise the CELL function call will return and
empty string.

Rick


"Rick Rothstein (MVP - VB)" > wrote in
message ...
> There are two ways to interpret "name of the current worksheet". If you
> mean the function is on, say, Sheet3 in cell A1 and you are on Sheet2 with
> a reference to that cell (=Sheet3!A1) and you want to see the name of the
> sheet that the sheet the function is actually on, then use this...
>
> =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)
>
> in A1 on Sheet3. But if, instead, what you want is the name of the active
> sheet (that is, the sheet name that the =Sheet3!A1 formula is on, then
> leave the cell references out of the above formula...
>
> =MID(CELL("filename",FIND("]",CELL("filename")+1,256)
>
> Rick
>
>
> "RJL007" > wrote in message
> ...
>> Is there a function in Excel that will return the name of the current
>> worksheet as a text string?
>>
>> If not a function, is there some other way of looking up the current
>> worksheet's name (perhaps VB) and saving/displaying it in a cell?

>


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lookup for worksheet Bradrok Excel Worksheet Functions 1 April 2nd 08 11:04 PM
lookup info in another worksheet steph Excel Worksheet Functions 0 August 23rd 06 10:10 PM
multiple worksheet lookup? spirosu Excel Discussion (Misc queries) 1 March 2nd 06 05:13 PM
LOOKUP a column from another worksheet UTPC01 Excel Discussion (Misc queries) 1 January 11th 06 01:52 PM
Worksheet lookup Greg B Excel Discussion (Misc queries) 2 August 4th 05 12:47 PM


All times are GMT +1. The time now is 11:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.