View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
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?