Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Saturday, May 15, 2010

Filename formula in Excel




There may be times when you need to insert the name of the current workbook
or worksheet in to a cell.
This can be done by using the CELL() function, shown below.
F:\Excel\[Functions in Excel.xls]TimeCalculation
 =CELL("filename")
The problem with this is that it gives the complete path including drive letter and folders.
To just pick out the workbook or worksheet name you need to use text functions.
To pick the Path.
F:\Excel\

 =MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)
To pick the Workbook name.
Functions in Excel.xls
 =MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1)
To pick the Worksheet name.
TimeCalculation
 =MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)


Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP