ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Name Cell or Worksheet (https://www.excelbanter.com/excel-worksheet-functions/165527-name-cell-worksheet.html)

JPA

Name Cell or Worksheet
 
Is it possible to use the function "cell" to access only the name of the
worksheet, instead of the whole path?

Formula-- =CELL("filename";A1)
Result-- C:\My Documents\[Table.xls]Sheet2

Result expected-- Sheet2


Niek Otten

Name Cell or Worksheet
 
=RIGHT(A1,LEN(A1)-FIND("]",A1))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"JPA" wrote in message ...
| Is it possible to use the function "cell" to access only the name of the
| worksheet, instead of the whole path?
|
| Formula-- =CELL("filename";A1)
| Result-- C:\My Documents\[Table.xls]Sheet2
|
| Result expected-- Sheet2
|



Gord Dibben

Name Cell or Worksheet
 
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

For more on this subject see Bob Phillips' site.

http://www.xldynamic.com/source/xld.xlFAQ0002.html


Gord Dibben MS Excel MVP


On Sat, 10 Nov 2007 01:14:01 -0800, JPA wrote:

Is it possible to use the function "cell" to access only the name of the
worksheet, instead of the whole path?

Formula-- =CELL("filename";A1)
Result-- C:\My Documents\[Table.xls]Sheet2

Result expected-- Sheet2




All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com