Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default how do I display the current worksheet name in a cell?

I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a function?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default how do I display the current worksheet name in a cell?

The workbook has to be saved first

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

A1 is irrelevant in this case, what the formula needs is a single cell
reference, it can be any not just A1 and it can be put in any cell including
A1

--
Regards,

Peo Sjoblom



"JayJay" wrote in message
...
I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a function?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default how do I display the current worksheet name in a cell?

Try this:

=MID(CELL("FILENAME",A1),FIND("]",CELL("FILENAME",A1))+1,999)

Note, that the workbook must be saved in order for this to work.

HTH,
Elkar


"JayJay" wrote:

I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a function?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default how do I display the current worksheet name in a cell?

Try,

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

Mike

"JayJay" wrote:

I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a function?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default how do I display the current worksheet name in a cell?

Thanks a lot - that works! very clever, I didn't realise the filename
function returned the tab name.

"Elkar" wrote:

Try this:

=MID(CELL("FILENAME",A1),FIND("]",CELL("FILENAME",A1))+1,999)

Note, that the workbook must be saved in order for this to work.

HTH,
Elkar


"JayJay" wrote:

I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a function?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default how do I display the current worksheet name in a cell?

You need to use a cell reference or it will return the sheet name of the
last sheet that was changed


=MID(CELL("filename",A1),SEARCH("]",CELL("filename",A1))+1,SEARCH("]",CELL("filename",A1))-SEARCH("[",CELL("filename",A1))-1)



--
Regards,

Peo Sjoblom



"Mike H" wrote in message
...
Try,

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

Mike

"JayJay" wrote:

I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a
function?



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default how do I display the current worksheet name in a cell?

Thanks Peo, you're right.

"Peo Sjoblom" wrote:

You need to use a cell reference or it will return the sheet name of the
last sheet that was changed


=MID(CELL("filename",A1),SEARCH("]",CELL("filename",A1))+1,SEARCH("]",CELL("filename",A1))-SEARCH("[",CELL("filename",A1))-1)



--
Regards,

Peo Sjoblom



"Mike H" wrote in message
...
Try,

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

Mike

"JayJay" wrote:

I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a
function?




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default how do I display the current worksheet name in a cell?

Absolutely right, I tried to do a quick cheat on this formula and never
consiodered the consequences :)

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

Mike

"Peo Sjoblom" wrote:

You need to use a cell reference or it will return the sheet name of the
last sheet that was changed


=MID(CELL("filename",A1),SEARCH("]",CELL("filename",A1))+1,SEARCH("]",CELL("filename",A1))-SEARCH("[",CELL("filename",A1))-1)



--
Regards,

Peo Sjoblom



"Mike H" wrote in message
...
Try,

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

Mike

"JayJay" wrote:

I want a function like =INFO() or =CELL() that returns the name of the
current worksheet, e.g. =CELL("WorkSheetName"). Is there such a
function?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
display current cell contents in another worksheet andy62 Excel Worksheet Functions 2 March 29th 07 07:48 PM
Saving current worksheet on cell value change scotty New Users to Excel 1 January 23rd 07 03:29 PM
How to get current worksheet name to display in a cell? xfixiate Excel Worksheet Functions 2 July 22nd 06 09:24 AM
Display multiple tabs in current worksheet MLK Excel Worksheet Functions 0 July 18th 06 02:43 PM
I need current value of one worksheet into another cell? Ryan Excel Worksheet Functions 7 March 26th 06 11:58 PM


All times are GMT +1. The time now is 09:08 AM.

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

About Us

"It's about Microsoft Excel"