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("fil
ename",A1),1)-FIND("[",CELL("filename",A1),1)-1)
The sheet name
RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",
A1),1))
--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
"Shawn Shuler" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I may be overlooking something simple but how can I echo the worksheet
name
> in a particular cell. FOr example, I want cell A1 to always contain the
> name of the worheet that cell is a part of. Cell A1 of the worksheet
> "SHEET1" would contain "SHEET1". I would need it to update if the sheet
> name were changed as well.
>
>