View Single Post
  #6   Report Post  
Andy Wiggins
 
Posts: n/a
Default

http://www.bygsoftware.com/Excel/functions/cell.htm

Workbook info using functions (and no VBA). Copy the formulas into your
workbook (If the workbook is new and has not been saved these formulas will
not work - there's no information for them to return!)

The file path and name
=CELL("filename",A1)

The file path
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1)

The file name
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("fi
lename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1) )-FIND("]",CELL("filename"
,A1),1))


--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Alexandra" wrote
in message ...

Hello,

I would like to know if there's a function or a macro to put the name
of the current sheet in a cell like
="this sheet is called"&<function that returns the name of the sheet

so that if a sheet's name is "kaput" it should appear "this sheet is
called kaput"

Tks
Alexandra


--
Alexandra
------------------------------------------------------------------------
Alexandra's Profile:

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