View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Formula returning the worksheet name

The following formula will return path+filename+worksheet name
=CELL("filename",A1)

So, therefore, you can use this formula to get the worksheet name alone
=MID(CELL("filename",A1),1+FIND("]",CELL("filename",A1)),31)

Note that the 31 value above is because a worksheet name can have a max
length of 31.
These formulas point to cell A1 in the current sheet, but can point to
any cell. Also, it is possible for them to point to cells in other
sheets and the formulas will return those other worksheet names. The
formula can also point to its own cell (i.e. the formula can be in A1
and point to A1).


Bob Phillips wrote:
See http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dminkov" wrote in
message ...

Hi everyone!

Is it possible to write a formula, which returns the name of the
worksheet as a value of the cell?

Waiting for your comments,

Dobrin


--
dminkov
------------------------------------------------------------------------
dminkov's Profile:

http://www.excelforum.com/member.php...o&userid=17757
View this thread: http://www.excelforum.com/showthread...hreadid=557305